Coding Interview University A personal reference copy of the open-source Coding Interview University curriculum. Repository Context Item | Details | Project type | Learning reference | Technologies | Computer science fundamentals, algorithms, data structures, system design | Primary focus | Structured interview preparation | Status | Reference material; original authorship and licence remain with the upstream…
This repository is part of my earlier learning and experimentation archive. My current professional focus is Java, Spring Boot, microservices, REST APIs, Kafka, cloud-native engineering, and banking technology. See my GitHub profile for current positioning and featured work.
Original Documentation
Coding Interview University
I originally created this as a short to-do list of study topics for becoming a software engineer,
but it grew to the large list you see today. After going through this study plan, I got hired
as a Software Development Engineer at Amazon!
You probably won’t have to study as much as I did. Anyway, everything you need is here.
The items listed here will prepare you well for an interview at just about any software company,
including the giants: Amazon, Facebook, Google or Microsoft.
This is my multi-month study plan for going from web developer (self-taught, no CS degree) to software engineer for a large company.
This is meant for new software engineers or those switching from
software/web development to software engineering (where computer science knowledge is required). If you have
many years of experience and are claiming many years of software engineering experience, expect a harder interview.
If you have many years of software/web development experience, note that large software companies like Google, Amazon,
Facebook and Microsoft view software engineering as different from software/web development, and they require computer science knowledge.
If you want to be a reliability engineer or operations engineer, study more from the optional list (networking, security).
When I started this project, I didn’t know a stack from a heap, didn’t know Big-O anything, anything about trees, or how to
traverse a graph. If I had to code a sorting algorithm, I can tell ya it wouldn’t have been very good.
Every data structure I’ve ever used was built into the language, and I didn’t know how they worked
under the hood at all. I’ve never had to manage memory unless a process I was running would give an “out of
memory” error, and then I’d have to find a workaround. I’ve used a few multidimensional arrays in my life and
thousands of associative arrays, but I’ve never created data structures from scratch.
It’s a long plan. It may take you months. If you are familiar with a lot of this already it will take you a lot less time.
How to use it
How to use it
Everything below is an outline, and you should tackle the items in order from top to bottom.
I’m using Github’s special markdown flavor, including tasks lists to check progress.
Create a new branch so you can check items like this, just put an x in the brackets: [x]
Some videos are available only by enrolling in a Coursera or EdX class. These are called MOOCs.
Sometimes the classes are not in session so you have to wait a couple of months, so you have no access.
I'd appreciate your help to add free and always-available public sources, such as YouTube videos to accompany the online course videos.
I like using university lectures.
For a richer, more up-to-date (2017), but longer treatment
Language Specific
You need to choose a language for the interview (see above). Here are my recommendations by language. I don’t have resources for all languages. I welcome additions.
If you read though one of these, you should have all the data structures and algorithms knowledge you’ll need to start doing coding problems.
You can skip all the video lectures in this project, unless you’d like a review.
Some people recommend these, but I think it’s going overboard, unless you have many years of software engineering experience and expect a much harder interview:
Important: Reading this book will only have limited value. This book is a great review of algorithms and data structures, but won’t teach you how to write good code. You have to be able to code a decent solution efficiently.
aka CLR, sometimes CLRS, because Stein was late to the game
The first couple of chapters present clever solutions to programming problems (some very old using data tape) but
that is just an intro. This a guidebook on program design and architecture, much like Code Complete, but much shorter.
“Algorithms and Programming: Problems and Solutions” by Shen
A fine book, but after working through problems on several pages I got frustrated with the Pascal, do while loops, 1-indexed arrays, and unclear post-condition satisfaction results.
Would rather spend time on coding problems from another book or online coding problems.
Before you Get Started
This list grew over many months, and yes, it kind of got out of hand.
Here are some mistakes I made so you’ll have a better experience.
1. You Won’t Remember it All
I watched hours of videos and took copious notes, and months later there was much I didn’t remember. I spent 3 days going
through my notes and making flashcards so I could review.
Keep in mind I went overboard and have cards covering everything from assembly language and Python trivia to machine learning and statistics. It’s way too much for what’s required.
Note on flashcards: The first time you recognize you know the answer, don’t mark it as known. You have to see the
same card and answer it several times correctly before you really know it. Repetition will put that knowledge deeper in
your brain.
An alternative to using my flashcard site is Anki, which has been recommended to me numerous times. It uses a repetition system to help you remember.
It’s user-friendly, available on all platforms and has a cloud sync system. It costs $25 on iOS but is free on other platforms.
Practice, practice, practice, until I’m sick of it, and can do it with no problem (some have many edge cases and bookkeeping details to remember)
Work within the raw constraints (allocating/freeing memory without help of garbage collection (except Python))
Make use of built-in types so I have experience using the built-in tools for real-world use (not going to write my own linked list implementation in production)
I may not have time to do all of these for every subject, but I’ll try.
This is a short book, but it will give you a great handle on the C language and if you practice it a little
you’ll quickly get proficient. Understanding C helps you understand how programs and memory work.
Gotcha: you need pointer to pointer knowledge:
(for when you pass a pointer to a function that may change the address where that pointer points)
This page is just to get a grasp on ptr to ptr. I don’t recommend this list traversal style. Readability and maintainability suffer due to cleverness.
dequeue() - returns value and removes least recently added element (front)
empty()
Implement using fixed-sized array:
enqueue(value) - adds item at end of available storage
dequeue() - returns value and removes least recently added element
empty()
full()
Cost:
a bad implementation using linked list where you enqueue at head and dequeue at tail would be O(n)
because you’d need the next to last element, causing a full traversal each dequeue
enqueue: O(1) (amortized, linked list and array [probing])
评论