tinyfold's blog

By tinyfold, history, 8 months ago, In English

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 :)

  • Vote: I like it
  • -6
  • Vote: I do not like it

»
8 months ago, hide # |
 
Vote: I like it +35 Vote: I do not like it

Why the downvotes? Is it colour bias -_-

  • »
    »
    8 months ago, hide # ^ |
    Rev. 3  
    Vote: I like it +8 Vote: I do not like it
    • 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.

    • »
      »
      »
      8 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      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.

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
8 months ago, hide # |
Rev. 2  
Vote: I like it +1 Vote: I do not like it

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.