Skip to main content

Timeline for Find a Similar Number

Current License: CC BY-SA 4.0

15 events
when toggle format what by license comment
Apr 8, 2020 at 21:55 comment added Master_ex @SurculoseSputum Thank you, I missed this part.
Apr 8, 2020 at 21:47 comment added Surculose Sputum The 1st and 6th leftmost digits (1-indexed) are 54 vs 44, which doesn't satisfy the requirement (4<5 iff 4<4).
Apr 8, 2020 at 21:44 comment added Master_ex @SurculoseSputum Maybe I am missing something. Isn't in that case 40213456789 for example similar?
Apr 8, 2020 at 21:32 comment added Surculose Sputum @Master_ex I don't think 50213456789 is a valid input, since there is no other number similar to it.
Apr 8, 2020 at 21:17 comment added Master_ex Nice! I am afraid it fails for 50213456789.
Apr 8, 2020 at 10:43 history edited Surculose Sputum CC BY-SA 4.0
-6 bytes
Apr 8, 2020 at 10:39 comment added xnor Shorter sorted indexing: TIO. Also more testing.
Apr 8, 2020 at 10:21 comment added Kevin Cruijssen @SurculoseSputum Glad you managed to fix it. And your approach inspired a -6 golf on my own answer. :)
Apr 8, 2020 at 10:17 comment added xnor @SurculoseSputum I also wrote out a pretty similar solution before finding it didn't work on those test cases.
Apr 8, 2020 at 10:17 comment added Surculose Sputum Fixed, but at the cost of 9 bytes. Thanks for pointing this out!
Apr 8, 2020 at 10:16 history edited Surculose Sputum CC BY-SA 4.0
new solution, fixed
Apr 8, 2020 at 9:52 history edited Surculose Sputum CC BY-SA 4.0
remove incorrect solution
Apr 8, 2020 at 9:50 comment added Kevin Cruijssen I like your 50-byter, but I'm afraid it's incorrect for n=9 and n=98765432111. You're supposed to find a different number.
Apr 8, 2020 at 9:45 history edited Surculose Sputum CC BY-SA 4.0
add example explanation
Apr 8, 2020 at 9:13 history answered Surculose Sputum CC BY-SA 4.0