code-examples/2025/01/cracking_code_interview_17_...
Tomasz Polgrabia 7f3f5bc070 Added implementation for 17.9 for kth multiples. Used Eratosthenes method which is less than desirable. 2025-01-06 12:22:04 +01:00
..
gradle/wrapper Added implementation for 17.9 for kth multiples. Used Eratosthenes method which is less than desirable. 2025-01-06 12:22:04 +01:00
src/main/kotlin/pl/polgrabia/demos/crackingcodeinterview/t17x9 Added implementation for 17.9 for kth multiples. Used Eratosthenes method which is less than desirable. 2025-01-06 12:22:04 +01:00
README.md Added implementation for 17.9 for kth multiples. Used Eratosthenes method which is less than desirable. 2025-01-06 12:22:04 +01:00
build.gradle Added implementation for 17.9 for kth multiples. Used Eratosthenes method which is less than desirable. 2025-01-06 12:22:04 +01:00
gradlew Added implementation for 17.9 for kth multiples. Used Eratosthenes method which is less than desirable. 2025-01-06 12:22:04 +01:00
gradlew.bat Added implementation for 17.9 for kth multiples. Used Eratosthenes method which is less than desirable. 2025-01-06 12:22:04 +01:00

README.md

Solution for 17.9

This solution uses Eratosthenes method which is simple but space O(n) which is less than ideal. Maybe there are better solutions because it requires also to give the max size of that array which is less than desirable.