Solutions for Programming Assignments in Courses 1-4 of the Coursera Algorithms Specialization offered by Stanford written in Kotlin scripts
Kotlin features such as extensions, inline classes, operator overloading, infix functions, tail recursive functions, scope functions, and collection operations based on extensions and functional programming are widely used in the code to enhance simplicity, efficiency, and readability, and to produce a proper blend of imperative programming, object oriented programming, and functional programming.
- Enable assertion for all scripts by adding the "-ea" VM option to detect potential bugs.
- Increase the stack size with "-Xss" VM option for some scripts that cause
StackOverflowError
. Increase the heap size with "-Xmx" VM option for some scripts that causeOutOfMemoryError
. - If you encounter compiling issues in IntelliJ IDEA, bring down the project bytecode version, the target JVM version, the Project language level, and the target platform in Preferences and Project Structure to 6 and 1.6.