Should I implement the problems in CTCI?

Jan 19, 2021 8 Comments

Title pretty much says it. As I'm going through CTCI should I actually implement all the problems or should I just go through all the solutions to understand the problems solving and then start practicing with leetcode?

I figured it's easier to practice on leetcode as you just have to write functions vs setting up environment/test cases for CTCI problems. TIA.

comments

Want to comment? LOG IN or SIGN UP
TOP 8 Comments
  • Google
    wlzufq

    Go to company page Google

    wlzufq
    To practice algorithms: maybe just do a pseudo code implementation on paper for the CTCi problems and check the algorithm against the soln.

    To practice coding: You’ll probably get more bang for your buck doing the actual code implementations in leetcode (you can do a search to see if the CTCI problem is in leetcode).

    But the hardest part should usually be the algo part (to do optimally).
    Jan 19, 2021 1
  • New / Eng
    NotFermat

    New Eng

    NotFermat
    Personally, I have been implementing them in Eclipse. I have them looked up the problems on Leetcode and noticed a bunch of them are there. I’ll redo them in LC so it reinforces what I learned.
    Jan 19, 2021 0
  • Epi(πŸ“š) is where its at
    Jan 19, 2021 3
    • Epi has a repo on GitHub that gives you a template and tests. Like an offline leetcode.
      Jan 19, 2021
    • I suggest a mix if you are short on time. May be skip the obvious ones and implement some so you have practice.

      Best to recreate the interview environment - with self(leetcode/epi), pramp or interviewing.io mock sessions.
      Jan 19, 2021
  • Leetcode
    Jan 19, 2021 0