Commit Graph

1886 Commits

Author SHA1 Message Date
KylerSmith
8dcd01ef5f Added NodeStack.java, another stack implementation 2017-07-10 07:31:42 -07:00
KylerSmith
96e89dbaac Remove .class file 2017-07-09 17:12:59 -07:00
KylerSmith
e00d95c417 Syntax fix 2017-07-09 17:11:57 -07:00
KylerSmith
ae7aba0b44 File clean-up 2017-07-09 16:29:00 -07:00
Anup Kumar Panwar
535add38de Merge pull request #66 from KylerSmith/master
Clean up ft.java and create CountChar.java.
2017-07-09 13:50:04 +05:30
KylerSmith
5fec65b247 Create Matrix data structure. 2017-07-08 20:10:43 -07:00
KylerSmith
1af3806a88 Clean up FloydTriangle (ft.java) 2017-07-07 18:24:45 -07:00
KylerSmith
da55838a8e Count character algo added 2017-07-07 18:12:14 -07:00
Ramshankar Yadhunath
aa6f2a7516 Inserting and deleting an element in java array 2017-07-03 20:50:53 +05:30
Varun Upadhyay
7133212630 Created AnyBaseToDecimal.java
An algorithm which can convert a given number of any base to its decimal value
2017-06-28 11:01:07 +05:30
Anup Kumar Panwar
ad1e42cfc4 Merge pull request #60 from varunu28/master
Create removeDuplicateFromString.java
2017-06-27 21:32:28 +05:30
Varun Upadhyay
542f68790d Create removeDuplicateFromString.java
An algorithm which removes duplicates from a given input string
2017-06-27 12:02:37 +05:30
Anup Kumar Panwar
370b988cf7 Merge pull request #59 from cosmeoes/patch-1
Added a few edge cases in the stack class
2017-06-21 12:38:56 +05:30
cosmeoes
cc5c1fe62e Added a few edge cases in the stack class
Added an if statement to:
>The push method to make sure the stack wasn't full.
>The pop method to make sure the stack wasn't empty.
> The peek method to make sure the stack wasn't empty.
2017-06-20 23:13:22 -06:00
Anup Kumar Panwar
4c6ea58203 Merge pull request #57 from ashish4321/master
floyd triangle
2017-06-16 18:20:42 +05:30
Ashish Agarwal
b8d98f9337 krishnamurthy 2017-06-16 17:05:39 +05:30
Ashish Agarwal
d89189a5d1 floyd triangle 2017-06-16 16:47:35 +05:30
Anup Kumar Panwar
b0c1fcc66c Merge pull request #56 from AndrewJey/master
Conversions Works
2017-06-10 11:40:38 +05:30
Andrés Jozef Jiménez Leandro
ec8b8c056a Conversions Works
Finished some unfinished conversions in Octal system.
Added Decimal to HexaDecimal conversion.
2017-06-09 16:50:42 -06:00
Anup Kumar Panwar
6bc4f91b6e Merge pull request #55 from MarcHines/patch-4
Update ReverseString.java
2017-06-02 11:07:24 +05:30
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
Anup Kumar Panwar
6ff4a1fb6f Merge pull request #53 from MarcHines/patch-2
Update countwords.java
2017-06-01 11:24:40 +05:30
MarcHines
abc0e4593d Update countwords.java
Class was added back.
2017-06-01 00:17:06 -04:00
Anup Kumar Panwar
e8e65504bf Merge pull request #52 from MarcHines/patch-1
Update Factorial.java
2017-06-01 06:34:18 +05:30
MarcHines
56ca966d47 Update countwords.java
Easier to read.
2017-05-31 19:59:11 -04:00
MarcHines
149e5d2abc Update Factorial.java
The factorial method can be simplified to 2 lines, which I believe is easier to read. Also, in previous version, if user enters two negative numbers back to back, the program crashes. We need a while loop to prompt the user until they actually enter the correct input, instead of only prompting them once. Also, if user enters a character instead of an integer, program crashes with no error message. We should fail more gracefully.
2017-05-31 19:38:17 -04:00
Anup Kumar Panwar
3907716e1f Merge pull request #51 from erugged93/patch-1
Update BinaryToOctal.java
2017-05-25 18:12:02 +05:30
Eric Ruggieri
10889f4993 Update BinaryToOctal.java
added logic to convert binary to octal
2017-05-24 13:46:54 -04:00
Anup Kumar Panwar
4e14531e07 Merge pull request #50 from UsernameToLon/BubbleSort
Bubble sort updated to efficient version
2017-05-19 08:27:04 +05:30
UsernameToLon
b829bc6a25 Merge pull request #1 from UsernameToLon/UsernameToLon-BubbleSort
Updated to more efficient version if array size is scaled.
2017-05-18 14:12:36 -04:00
UsernameToLon
e5dd6eff02 Updated to more efficient version if array size is scaled.
Changed loop from "for" to "do-while". Added decrement at end of do loop to decrease size of array tested after each iteration.
2017-05-18 14:11:47 -04:00
Chetan Kaushik
1bd077ea41 Merge pull request #48 from theycallmemac/patch-20
Rename data_structures/BinaryTree.java to data_structures/Trees/Binar…
2017-05-14 23:27:01 +05:30
James Mc Dermott
ced637c301 Rename data_structures/BinaryTree.java to data_structures/Trees/BinaryTree.java 2017-04-27 15:45:42 +01:00
Chetan Kaushik
47818bf583 Merge pull request #32 from theycallmemac/patch-4
Rename LinearSearch.java to Searches/LinearSearch.java
2017-04-27 20:06:52 +05:30
Chetan Kaushik
ef840988fc Merge pull request #31 from theycallmemac/patch-3
Rename BinarySearch.java to Searches/BinarySearch.java
2017-04-27 20:06:44 +05:30
Chetan Kaushik
f859520729 Merge pull request #33 from theycallmemac/patch-5
Rename BinaryToDecimal.java to Conversions/BinaryToDecimal.java
2017-04-27 20:05:48 +05:30
Chetan Kaushik
6c3906f064 Merge pull request #34 from theycallmemac/patch-6
Rename BinaryToOctal.java to Conversions/BinaryToOctal.java
2017-04-27 20:05:43 +05:30
Chetan Kaushik
d4dfa0701d Merge pull request #35 from theycallmemac/patch-8
Rename OctalToBinary.java to Conversions/OctalToBinary.java
2017-04-27 20:05:34 +05:30
Chetan Kaushik
d4ebaeafb8 Merge pull request #36 from theycallmemac/patch-9
Rename OctalToDecimal.java to Conversions/OctalToDecimal.java
2017-04-27 20:05:28 +05:30
Chetan Kaushik
1fa88098b8 Merge pull request #37 from theycallmemac/patch-7
Rename DecimalToBinary.java to Conversions/DecimalToBinary.java
2017-04-27 20:05:22 +05:30
Chetan Kaushik
ee3280563d Merge pull request #39 from theycallmemac/patch-11
Rename HeapSort.java to Sorts/HeapSort.java
2017-04-27 20:05:06 +05:30
Chetan Kaushik
4e60f9ba6b Merge pull request #38 from theycallmemac/patch-10
Rename BubbleSort.java to Sorts/BubbleSort.java
2017-04-27 20:04:42 +05:30
Chetan Kaushik
1d1632509f Merge pull request #40 from theycallmemac/patch-12
Rename InsertionSort.java to Sorts/InsertionSort.java
2017-04-27 20:04:38 +05:30
Chetan Kaushik
8c60fea02e Merge pull request #41 from theycallmemac/patch-13
Rename InsertionSortInteger.java to Sorts/InsertionSortInteger.java
2017-04-27 20:04:17 +05:30
Chetan Kaushik
398cc6ce8c Merge pull request #42 from theycallmemac/patch-14
Rename MergeSort.java to Sorts/MergeSort.java
2017-04-27 20:04:01 +05:30
Chetan Kaushik
f0c38df2e9 Merge pull request #43 from theycallmemac/patch-15
Rename Quicksort.java to Sorts/Quicksort.java
2017-04-27 20:03:50 +05:30
Chetan Kaushik
84eb97306c Merge pull request #44 from theycallmemac/patch-16
Rename SelectionSort.java to Sorts/SelectionSort.java
2017-04-27 20:03:14 +05:30
Chetan Kaushik
c8f0c0bfc9 Merge pull request #45 from theycallmemac/patch-17
Rename radixSort.java to Sorts/radixSort.java
2017-04-27 20:03:04 +05:30
James Mc Dermott
3ead086ef3 Rename radixSort.java to Sorts/radixSort.java 2017-04-27 15:30:05 +01:00
James Mc Dermott
88338805a3 Rename SelectionSort.java to Sorts/SelectionSort.java 2017-04-27 15:29:41 +01:00