Friday, January 12, 2018

Interview stories



https://medium.com/always-be-coding/four-steps-to-google-without-a-degree-8f381aa6bd5e
Step #3: Fill in the gaps. Because I didn’t have a formal CS degree, I knew I lacked a lot of fundamental knowledge. For example, I implemented a physics engine but never solved a dynamic programming problem. To fill these gaps, I implemented nearly all of the most common data structures and algorithms that I heard or read about. The information you need is out there in spades, but there’s a chasm between knowing how something works by observing it, and knowing why something works by building it.
Over time, do the following:
  1. Master at least one of C, C++, Objective-C, Java, PHP, Python or Ruby. Become fluent in at least one of the other languages and become familiar with Scala, Haskell or Lisp.
  2. Learn your data structures. Implement most of them. Understand their time complexities.
  3. Solve programming problems. Read this and solve many of these.
  4. Build your portfolio of (un)finished projects (e.g., programming frameworks, mobile or web apps, small games, and so on).
One year later, I resubmitted my resume. Except this time I took the “Education” section out of it altogether. Ironically, a recruiter called me and scheduled a technical phone-screen interview. I asked if we could schedule it for two weeks later and she agreed. I needed that time. I used it to cram as many algorithms and data structures into my head as humanly possible. I coded 12-14 hours a day and solved hundreds of problems. I was literally obsessed and wouldn’t stop until my fear of the Google interview turned into confidence and excitement.
Step #2: Befriend a master. This is the probably one of the most important things you can do. Find someone that is a master at your craft, make them your mentor, and never stop learning. While working at Double Helix that master was Nathan Hunt, one of the smartest and most humble guys I had ever met. And he was extremely patient with all of my questions no matter how elementary. I must have walked into his office thousands of times to ask random questions like, “how can I smoothly interpolate from one rotation matrix to another?” or “how should I implement moving capsule-to-cylinder collision detection?” Years later, he would join Google one month after me.
Each of my mentors changed something about the way I approached problems or viewed the world. And there are only a small handful.


2) Design Microsoft Paint. This was by far the most fun problem. I started by drawing up interfaces and a class diagram. I made mention of a Paint Bucket and the interviewer asked me to implement it. Luckily, I knew how to implement an iterative, breadth-first traversal with my eyes closed thanks to TopCoder.
3) Describe your software virtues. This was an “open-ended” discussion interview. I talked about the types of testing and when they are valuable (e.g., unit, integration, acceptance). I talked about consistent style for maintainability of code. And so on. Things you would find in books like Code Complete or Effective Java.

https://medium.com/always-be-coding/abc-always-be-coding-d5f8051afce2
  1. ABC (Always Be Coding). The more you code, the better you’ll get — it’s that simple. By coding, you’re practicing. But the best practice is focused practice. Have goals in mind, explore new areas, and challenge yourself. Over time, you should develop a portfolio of both unfinished and finished projects. GitHub is a great place to put this portfolio on display, but just having an eclectic body of work is huge.
  1. Know thy complexities. Read this cheat sheet. Then make certain you understand how they work. Then implement common computational algorithms such as Dijkstra’s, Floyd-Warshall, Traveling Salesman, A*, bloom filter, breadth-first iterative search, binary search, k-way merge, bubble/selection/insertion sort, in-place quick sort, bucket/radix sort, closest pair and so on. Again, ABC. This article is also a good, thorough primer.
  2. Re-invent the wheel. You should implement the most common data structures in your language of choice. Do not rely on common libraries. Implement the following and write tests for them: vector (dynamic array), linked list, stack, queue, circular queue, hash map, set, priority queue, binary search tree, etc. You should be able to implement them quickly.
  3. Solve word problems.  It all comes down to fundamental programming concepts. Spend at least 40 hours coding solutions to different types of problems. One of the best resources is TopCoder. Read this. Then try solving problems. Pick those that test your ability to implement recursive, pattern-matching, greedy, dynamic programming, and graph problems. Just go through a bunch of archived problems.

  1. Note, coding in front of others can be daunting. Find a way to practice both white-boarding and pair-programming. Google is basically all about coding at a whiteboard, whereas Square is effectively all pair-programming at a real machine with your language and IDE of choice. Read this article from my friend and former colleague Dan.
  1. Don’t make assumptions. Ask questions if you’re not sure. If you’re asked a question and you aren’t 100% certain what the problem is, then ask. There are a number of times where I’ve seen a candidate go down some path, never ask a question and ultimately waste time solving the wrong problem.
  2. Smile. Be excited, happy and positive. But don’t overdo it


Labels

Review (572) System Design (334) System Design - Review (198) Java (189) Coding (75) Interview-System Design (65) Interview (63) Book Notes (59) Coding - Review (59) to-do (45) Linux (43) Knowledge (39) Interview-Java (35) Knowledge - Review (32) Database (31) Design Patterns (31) Big Data (29) Product Architecture (28) MultiThread (27) Soft Skills (27) Concurrency (26) Cracking Code Interview (26) Miscs (25) Distributed (24) OOD Design (24) Google (23) Career (22) Interview - Review (21) Java - Code (21) Operating System (21) Interview Q&A (20) System Design - Practice (20) Tips (19) Algorithm (17) Company - Facebook (17) Security (17) How to Ace Interview (16) Brain Teaser (14) Linux - Shell (14) Redis (14) Testing (14) Tools (14) Code Quality (13) Search (13) Spark (13) Spring (13) Company - LinkedIn (12) How to (12) Interview-Database (12) Interview-Operating System (12) Solr (12) Architecture Principles (11) Resource (10) Amazon (9) Cache (9) Git (9) Interview - MultiThread (9) Scalability (9) Trouble Shooting (9) Web Dev (9) Architecture Model (8) Better Programmer (8) Cassandra (8) Company - Uber (8) Java67 (8) Math (8) OO Design principles (8) SOLID (8) Design (7) Interview Corner (7) JVM (7) Java Basics (7) Kafka (7) Mac (7) Machine Learning (7) NoSQL (7) C++ (6) Chrome (6) File System (6) Highscalability (6) How to Better (6) Network (6) Restful (6) CareerCup (5) Code Review (5) Hash (5) How to Interview (5) JDK Source Code (5) JavaScript (5) Leetcode (5) Must Known (5) Python (5)

Popular Posts