I am preparing for interviews and brushing up on my algorithms. I understand what BFS and DFS do, but trying to transform the word


...and making sure each time you change the word it's a valid word... Like what the fuck? Who thinks of these problems.

I am getting very discouraged when it comes to these "Medium" problems (or at least like this). I don't know how to approach them. Reading the solution just feels like cheating and I should be able to get there by myself.

Can anyone help me not feel discouraged? I just feel very shitty right now.

  • 0
    Is that a combinatorial problem? Lets solve this here! Also, when is such a problem a real thing you would solve? A real world example that falls into this class of problem solving would be interesting.
  • 2
    @24th-Dragon I have learned to solve tougher problems during coding challenges. Gained some insights to solving certain class of problems. Have I seen the same problems in my main work? Not very much.
  • 0
    Usually simpler than that. You're supposed to ask what the criteria for a valid word is, and implement a function to check according to what they state.

    It'll be something like "three letter word has to have a vowel in the middle," so the comp set of chars for pos 1 is 6/5 chars wide, positions 0 and 2 are 20/21 chars wide. The bonus pivot there is "is y a vowel?"

    It's also generally faster if you convert everything to numbers (char code or discrete enum) which would get you more points.
Add Comment