TheAlgorithms / Scala

All Algorithms implemented in Scala
MIT License
1.08k stars 392 forks source link

made some changes #58

Open AndySakov opened 3 years ago

AndySakov commented 3 years ago

Changes Made Mathematics -> Abs.scala - Removed redundant return keywords, made the whole function inline and fixed issues found in the doc comments AbsMax.scala - Added the imports for abs function implemented in Abs.scala and fixed issues found in the doc comments AbsMin.scala - Added the imports for abs function implemented in Abs.scala and fixed issues found in the doc comments BinaryExponentiation.scala - Removed redundant return keywords and brackets, fixed issues found in the doc comments and refactored the tabs and spaces properly Fibonacci.scala - Changed numeric type from Int to Long to accommodate for bigger numbers and fixed issues found in the doc comments FindMax.scala - fixed issues found in the doc comments FindMin.scala - fixed issues found in the doc comments GreaterCommonDivisor.scala - changed name to GreatestCommonDivisor [test spec, file and object names], added tailrec annotation and fixed issues found in the doc comments LinearSieve.scala - Changed numeric type from Int to Long to accommodate for bigger numbers and fixed issues found in the doc comments PrimeFactors.scala - Removed redundant return keywords and brackets, fixed issues found in the doc comments and refactored the tabs and spaces properly StreamSieve.scala - Changed numeric type from Int to Long to accomodate for bigger numbers and fixed issues found in the doc comments Search -> BinarySearch.scala - Added tailrec annotation JumpSearch.scala - Removed redundant return keywords LinearSearch.scala - Removed unnecessary parenthesis Sort -> BubbleSort.scala - Changed '0 to array.length - 1' to 'array.indices' HeapSort.scala - Changed 'var to val' on line 31 and fixed issues found in the doc comments InsertionSort.scala - Changed '0 to array.length - 1' to 'array.indices' MergeSort.scala - Fixed a typo on line 30 SelectionSort.scala - Changed '0 to array.length - 1' to 'array.indices' and Changed 'i + 1 to array.length - 1' to 'i + 1 until array.length'