Блог пользователя tinyfold

Автор tinyfold, история, 10 месяцев назад, По-английски

Hi everyone! I have finally finished my first problem. You can find it here. Constructive feedback welcome! Comment how long it took you to solve it :)

  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится +35 Проголосовать: не нравится

Why the downvotes? Is it colour bias -_-

  • »
    »
    10 месяцев назад, скрыть # ^ |
    ← Rev. 3  
    Проголосовать: нравится +8 Проголосовать: не нравится
    • Most of the problem is the implementation
    • The implementation is annoying
    • Super guessable
    • The setup is way too contrived and messy; reading comprehension test

    To me, a good problem should hit a few criteria

    • the setup feels natural or intuitively easy to understand
    • the solution's ratio of (idea) : (details) should be as high as possible
    • the idea part should feel elegant or nice to come up with (this part is more subjective)

    I feel like this problem hits none of those criteria, which is probably why it got downvoted. That's not to say you should give up; most people's first attempt at a problem isn't very good. (Honestly, it's not that bad for a first try.) Keep trying and hopefully you can come up with something better.

    • »
      »
      »
      10 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      Thank you for taking a look at my problem! My original thought for this problem didn't include the restriction on slot 3, but I wasn't able to find a solution. (maybe its NP-Hard?) I will put those aspects of a good problem into mind when making the other problems in this series.

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Few things to note

  1. please never make the samples directly from the solution for a constructive, it makes it way too obvious to guess, especially in this case.

  2. its simply not a good problem since there is basically no nice/(or any imo) observation, the idea of greedily searching in order is very standard, and again your samples make it even more obvious

  3. it took me like 10m ig

  4. take the downvotes as feedback, you posted a problem and got downvoted, this means the problem is probably bad, though I will admit others not explaining why is odd.

Code incase anyone cares enough

»
10 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

Task is good. But i tried to pop_front for 15 minutes, and after that i see that you should get element from back :P. I think better to print that:

Slot starts from end of array

Or give a hint. Maybe i'm dumb and read the Explanation. But problem good. This is not 100% implementation. I don't know how others do that, but tried to find and x — the intial number when i try to sort:

x = 1: we trying to find the number 1 in 1 and 2 slots

x = 2: we trying to find the number 2 in 1 and 2 slots

And after that get the element from 1 or 2 slot and put in 3 slot.

Keep it up. Your problems good.