LeetCode - Some of the problem solutions are going above my head!!

Apple / Eng
1444162

Apple Eng

BIO
Just an another engineer. Hoping to find a few friends here :)
1444162more
Jul 9 18 Comments

I have solved some of the most complex problems in back end applications. I am good at writing compact, generic and extensible code with object oriented concepts in mind and developing multi tier applications.

So, I am not such a bad engineer or brilliant engineer. I know how to get the job done as an IC.

But still, some of the LeetCode problems are going way above my head. No matter how much time I spend I don't come up with a right solution myself. LC so far is just 40+. Though I look at the solution for some of the LC problems I don't quite fully understand it.
I tried debugging the solution too.

What will you do if you don't understand the solution? Do you ask your friends for help? Should I have to solve more problems so I understand the pattern of solutions to different problems?

PS: I am just a contractor at Apple.

comments

Want to comment? LOG IN or SIGN UP
TOP 18 Comments
  • Goldman Sachs faith91
    This is what worked for me. I was able to crack Amazon and Google. I am waiting to hear back from LinkedIn! This strategy might not work for everyone!

    For DS and Algos, I never touched anything other than LC. I have practiced around 320+ questions.

    When I started practicing around a few months back, it use to take me around 20-30 mins to solve even an easy question. And I used to take a long time to solve each question but I knew that things would get easier.

    I was mainly focusing on getting my understanding of Collections and Arrays right! I would also spend a lot of time on googling which collection to use in which cases. Overtime, I started getting a good grasp of it. I started asking myself questions like how do I decide if I want to use a Priority Queue or a TreeMap?

    After 1 month, when I started feeling confident about the DS, I moved on to a bit more advanced topics like Trees, Graphs and DP because all these topics use the basic collections I had already studied. I would solved questions on these topics and the previous topics in a mixed manner (didn’t give too much importance to one topic over the other). Then, one day my friend asked me as to why I haven’t looked at the Trie DS? It was the best input ever! One of my rounds, both at Amazon and Google, focused only on Trie!

    Over a period of 2-2.5 months, I could see that I was solving easy questions in under 10 mins and medium questions in around 20 mins, on a compiler!

    Also, there is no point in keep solving new questions. it is very important that you keep revisiting your old solutions every now and then. Not only you will realize that you had forgotten quite a few solutions but also, you will realize that you have started thinking about smarter and cleaner code over time!
    Jul 9 4
    • Goldman Sachs faith91
      P.S.- I was a C++ developer until 5 months back. Right when I made a switch to Java, was around the time I had started preparing for interviews as well. So, I had no idea how to use collections and all that. That’s why, I had to start ground up!
      Jul 9
    • Intel / Eng NerdyTurd
      This is good, Thanks for sharing
      Jul 9
    • New / Eng blezoss
      +1 on revisiting old solutions. I noticed I solved them faster & cleaner & I was like wtf did I solve it like this in the first place?
      Jul 9
    • Rackspace / Eng VecY65
      Great answer. Also, tries are the bee's knees.
      Jul 10
  • Facebook ⭕w⭕
    First of all, stop conflating your IC skills with LC skills, they are very different things.

    Second, 40 problems is NOTHING.

    Third, some of the "solutions" you'll see in Discuss or Solution tab on LC are honestly garbage which could explain some solutions being hard to understand, that's why people recommend warming up with CTCI and/or EPI first because the solutions there are cleaner and easier to understand (EPI has very detailed explanations). After you go through those, you'll recognize the bad solutions on LC.

    Honestly, I think leets have become kind of a meme here; if you study just EPI deeply, that is good enough to pass any FANG interview. That being said, recognize that Blinders here typically solve 100+ leets, so again your 40+ amounts to diddly squat. Keep practicing.
    Jul 9 4
    • Apple / Eng
      1444162

      Apple Eng

      BIO
      Just an another engineer. Hoping to find a few friends here :)
      1444162more
      OP
      I tried skipping CTCI and EPI completely. I realize my mistake through your point. Thanks a lot for reminding me to get back on track!!
      Jul 9
    • Reliable Software / Eng (. .)
      What's IC skills? Individual contributions?
      Jul 9
    • Apple / Eng
      1444162

      Apple Eng

      BIO
      Just an another engineer. Hoping to find a few friends here :)
      1444162more
      OP
      Yes individual contributor
      Jul 9
    • Reliable Software / Eng (. .)
      Cracking the coding interview and elements of programming interviews. These are books.

      Also join ctci slack channel. It's maintained by the author. Sometimes she responds there if you have any questions
      Jul 9
  • Apple / Eng
    1444162

    Apple Eng

    BIO
    Just an another engineer. Hoping to find a few friends here :)
    1444162more
    OP
    Yes that's what I thought to do but I don't have enough time to spend by managing work and family. So, I started thinking what's the right approach for me. As the other person said CTCI and EPI seem a right approach because thats going to provoke my thinking and improve my understanding of different pattern of solutions.
    Jul 9 2
    • eBay / Eng inthbfhdb
      Try 2 hrs on weekday , 6 hrs at the weekend
      Jul 9
    • Apple / Eng
      1444162

      Apple Eng

      BIO
      Just an another engineer. Hoping to find a few friends here :)
      1444162more
      OP
      Yes, I should plan and stick to the timings!
      Jul 9
  • Intel / Eng NerdyTurd
    Remember guys, the best bang for your interview buck is to focus on medium difficulty LC questions, if you can solve those questions in a fast manner then you are in good shape, also practice few hard commonly asked LC questions, just in case
    Jul 9 0
  • New / Eng FAANG_
    May I ask how you passed apple interview?
    Jul 9 2
    • Apple / Eng
      1444162

      Apple Eng

      BIO
      Just an another engineer. Hoping to find a few friends here :)
      1444162more
      OP
      As I mentioned in my post, I am just a contractor at Apple
      Jul 9
    • New / Eng FAANG_
      Do you mean contractors got easy Leetcode in interviews?
      Jul 9
  • New / Eng FAANG_
    Also what is the difference between contractor and full time employee? Salary , limited time , special projects ?
    Jul 9 0