Refresh algorithms
siriak opened this issue · 3 comments
siriak commented
I propose to update all algorithms to match coding standards. As a reference, please take a look at already refreshed algorithms. I will update this checklist as necessary. Feel free to make PRs and reference this issue there.
Encoders
- Caesar
- Hill
- Vigenere
Data Compression
- Huffman Encoding
- Shannon-Fano Encoding
Numeric
- Binary GCD
- Euclidean GCD
- Other
- Fermat Prime Checker
- Prime Finder
- Sieve of Eratosthenes
- Vowel Checker
- Searches
- A-Star
- Binary
- Linear
Sorts
- Binary Insertion
- Bogo
- Bubble
- Bucket
- Cocktail
- Cycle
- Heap
- Insertion
- Merge
- Pancake
- Quick
- Radix
- Selection
- Shell
String
- Longest Consecutive Character
- Palindrome Checker
Traversals
- Tree Traversal
justindongqiang commented
I can work it. Where is the coding standards reference?
siriak commented
@justindongqiang , take a look at BubbleSorter, CaesarEncoder or VigenereEncoder, these classes are well-written. In general, the process is as follows:
- Add an interface that a bunch of classes will implement (interface ISorter) (if it's not added yet)
- Add a class that implements the interface (class BubbleSorter)
- Write an algorithm in corresponding method (method Sort)
- Add unit tests to check whether the algorithm works correctly (class BubbleSorterTests)
Step 4 can be implemented later. Also please write which algorithm(s) you will be working on, so that others won't work on them.