Saturday, July 16, 2016

Coding practice talk

July 16, 2016

  Spend some time to work on a small research topic this weekend: "coding practice", "How to conduct rigorous training".

  Read the article about facebook coding requirement, since Julia spent over 3 hours on facebook code lab and then start to find her weakness to work on.



  • Write a working solution and iterate. It's better to have a non-optimal but working solution than random fragments of an optimal but unfinished solution. (Julia's comment: 10/10)
  • Listen for hints. If your interviewer gives you hints to improve your code, please run with them.
  • Prep questions for us in advance. You'll most likely have some time at the end for questions for your interviewer. Some people find it easier to come up with a few questions in advance rather than think of them on the spot.
  • Don't worry about memorizing tables of runtimes or API calls. It's always good to know how to figure out approximate runtimes on the fly but the code you write is more important.
  • If your solution is getting ugly, step back. Most coding interview questions are designed to have reasonably elegant solutions. If you have festoons of if-else blocks and special cases everywhere, you might be taking the wrong approach. Look for patterns and try to generalize.
     (Julia's comment: 10/10)
(Julia's thought: practice more, and also review each practice, write down the issues.)

How to Prepare:


  • Do as many coding questions as you can. Visit GlassdoorCareercupProject Euler, orFacebook Code Lab or another site that hosts questions. The idea isn't to see every question, but to become familiar with the pattern of interpreting a question, formulating a solution, and writing an efficient, bug-free program without a compiler.
  • Practice on a whiteboard or with pencil and paper. Practice under time pressure: coding speed is important. The more rigorous your training, the easier you'll find the interviews.
  • Go over data structures, algorithms and complexity: Be able to discuss the big-O complexity of your approaches. Don't forget to brush up on your data structures like lists, arrays, hash tables, hash maps, stacks, queues, graphs, trees, heaps. Also sorts, searches, and traversals (BFS, DFS). Also review recursion and iterative approaches.
    • Our typical coding questions aren't phrased as “implement x”; they're “solve this problem.” You can pick from a number of approaches. (No one is going to ask you “implement Knuth-Morris-Pratt” or “construct a 2-3-4 tree.”)
    • Your reasoning is important. Engineering is all tradeoffs so be able to discuss those.
  • Additional reading resources: Cracking the Coding InterviewIntroduction to Algorithms,Algorithms in C.

Learn from the tennis professional player - Milos Raonic - 

http://www.milosraonicofficial.com/about/

https://www.youtube.com/watch?v=A3Q4IIIL_fk




No comments:

Post a Comment