java-algorithms-implementation icon indicating copy to clipboard operation
java-algorithms-implementation copied to clipboard

Algorithms and Data Structures implemented in Java

Results 82 java-algorithms-implementation issues
Sort by recently updated
recently updated
newest added

For my project, I needed to implement sorting with the American flag. Searching the Internet for a code just to get acquainted with the algorithm (it's easier for me), I...

#### By submitting this pull request I confirm I've read and complied with the below requirements. - [x] I have read the [Contribution guidelines](CONTRIBUTING.md) and I am confident that my...

The inner-most for-loops in the Matrix.add and Matrix.subtract functions are not needed. This pull request removes them. All tests still pass. See more details in issue #168 (created by me)....

Created functions which take two `Number` objects, and either adds, subtracts, or compares them. These Number objects can be of type Integer, Long, Float, Double, BigInteger or BigDecimal. Also added...

The function `multiplyUsingLoopWithStringInput` in Multiplication.java can now handle zero inputs. Also added branch coverage for this. See issue #165 for more details. #### By submitting this pull request I confirm...

In the files FenwickTree.java, Matrix.java and SegmentTree.java (all in the folder `\src\com\jwetherell\algorithms\data_structures`), there are comments saying `TODO: This is ugly and how to handle number overflow?`. See example below. These...

In the function Matrix.add (see code below), the innermost for-loop is unneeded (notice that the iterator `i` is not used at all). Removing this for-loop can reduce the time complexity...

Added the tests to a few methods to increase branch coverage. In the process we discovered a bug which is described in issue #165. #### By submitting this pull request...

We added the following test (in MathematicsTests) which checks that the method Multiplication.multiplyUsingLoopWithStringInput works correctly when multiplying with zero. It fails with the error below Test: @Test public void testMultiplyUsingLoopsWithStringInputZero(){...

fixes #2 Co-authored-by: psalqvist