codewars / content-issues

Higher level issue tracker for the Codewars content.
15 stars 1 forks source link

Deduplicate - Shortest steps to a number #218

Open 4500zenja1 opened 6 days ago

4500zenja1 commented 6 days ago

Taken from the wiki (link)

  1. Shortest steps to a number

    • 6 kyu;
    • You need to find the amount of steps to go from 1 to N, the accesible steps are +1 or x2;
    • 95% satisfaction from 511;
    • 1.5 pending issues (one on this matter, the other is about to be resolved);
    • 14 languages;
    • Published May 2019, author last active on May 2024.
  2. T.T.T.19: How many steps are required to turn A into B?

    • 6 kyu;
    • You need to find the amount of steps to go from A to B, the accesible steps are +1 or x2;
    • 97% satisfaction from 85;
    • 1 pending issue on this matter;
    • 2 languages + 1 pending translation
    • Published August 2016, author inactive.
  3. Time Is Money (number of operations)

    • 6 kyu;
    • Basically that's a performance (input is up to 99^9999) kata which uses the reverse process of the katas above
    • 82% satisfaction from 33;
    • 1 pending issue on this matter;
    • 1 language (Python)
    • Published November 2022, author active.
monadius commented 6 days ago

2 is different from 1 and 3. 3 is very similar to 1. It has performance requirements but they are not very important for this task because O(log n) solutions are simpler than other solutions (BFS). So I propose to retire 3 and keep 1 and 2.

4500zenja1 commented 6 days ago

To think about that, 1 and 2 have the same concept, but 2 works with different starting numbers, which differentiate it from 1.

3 is just 1 but with performance-stress tests, maybe you just need to add them to 1 and then safely retire 3

monadius commented 6 days ago

There are should be no performance requirements for 1: It is always good to see different solutions. Moreover, there are not many solutions which will time out if performance tests are added to 1. It is also difficult to add consistent performance tests to all existing languages. JS should be switched to BigInt, C has no big integers, etc.