JavaScript
JavaScript copied to clipboard
Improper and incomplete implementation of CycleDetection.js
Implementation of CycleDetection.js seems inappropriate.
- Weird function name
main()and its invocation can cause the program to crash. - Tests are missing.
- Not exported, Hence not resuable.
- Can be optimized further (Optional)
The algorithm is complete. It has poor code quality though, as you have pointed out. Feel free to fix it.