Commit Graph

3 Commits

Author SHA1 Message Date
MarcHines
066dd615a6 Update ReverseString.java
Using recursion for reversing a String serves us no benifit. It places extra load on the stack, and it is less efficient than doing so iteratively. I understand now that we can not use built in reverse function, but using recursion is still the worst way we could do the task of String reversal. Everytime we call the reverse method we are placing an extra frame on our stack. This uses space. We also create another string that we are appending our result to with the recursive solution, which is slow because under the hood, Java will create a new empty String and then append each character to the new String, one char at a time. If we do this for each character, then asymtotically we now have time complexity of O(n^2).  Recursion in this case also does not make our solution "simpler" or "more elegant". We want to use recursion when it is advantageous to do so....like traversing trees
2017-06-01 08:09:19 -04:00
zacharyjones123
03dbfa78c8 - Closed all Scanner and Buffered Readers
- Added Some Java Doc

- ReverseString - took space out of between each letter so "Zachary" to
"yrahcaZ" instead of "y r a h c aZ"

- bfs - Trying to repair this class but need to research bfs more

- dfs - Trying to repair this class but need to research dfs more

- Added new Classes
1) OctalToBinary - Not done
2) BinaryToOctal - Not done
3) OctalToDecimal - Not done
4) Graphs

-Added the dataStructure Graphs (Unfinished)
2017-04-20 11:56:21 -07:00
zacharyjones123
9411d5be56 In this commit I have:
Added JavaDoc to every package except for "heaps"
2017-04-18 07:57:17 -07:00