Skip to main content

Timeline for Mastermind game in Kotlin

Current License: CC BY-SA 4.0

12 events
when toggle format what by license comment
Nov 19, 2018 at 14:56 history edited Konrad Morawski CC BY-SA 4.0
added 27 characters in body
Nov 18, 2018 at 22:11 comment added Konrad Morawski Glad I could be of help! Thanks for accepting the answer. @DawitAbraham
Nov 18, 2018 at 21:19 vote accept Dawit Abraham
Nov 18, 2018 at 21:19 comment added Dawit Abraham Thank you @Konard. The functional approach may indeed be an overkill but I did learn some things from it. The second optimized version is definitely more efficient!
Nov 17, 2018 at 20:04 history edited Konrad Morawski CC BY-SA 4.0
deleted 1574 characters in body
Nov 17, 2018 at 18:20 history edited Konrad Morawski CC BY-SA 4.0
edited body
Nov 17, 2018 at 18:09 comment added Konrad Morawski I also added a version that tries to combine both approaches (while introducing minor optimizations). Thank you for your input @Graham
Nov 17, 2018 at 18:09 history edited Konrad Morawski CC BY-SA 4.0
added 1942 characters in body
Nov 17, 2018 at 18:00 comment added Konrad Morawski For the first part of the task (counting identical letters at the same indices) the functional approach is definitely more concise and readable. For the other part it might indeed be overkill - I just wanted to demonstrate the possibility.
Nov 17, 2018 at 17:56 history edited Konrad Morawski CC BY-SA 4.0
added 1295 characters in body
Nov 17, 2018 at 17:52 comment added Graham I appreciate you noting the efficiency concerns for large input-sizes. I don't necessarily agree with your assessment that a functional is inherently "better", and the code seems less clear and more complex in your current approach; I don't really see the benefit.
Nov 17, 2018 at 17:42 history answered Konrad Morawski CC BY-SA 4.0