這是從 coding-interview-university Forked 後稍微修改樣式,使其能夠在網頁上直接瀏覽的版本,你可以到 Repo上幫忙修改樣式。也可以直接到原 Repository 上閱讀 Markdown 檔案

Coding Interview University

原先我為了成為一個軟體工程師而建立這份簡單的讀書主題清單(To-do list), 但這份 To-do list 隨著時間而膨脹成這個樣子。 做完這份 To-do list 上的每個目標後,我成為了 Amazon 的工程師! 你或許不需要像我讀一樣多。但是,每個讓你成為一位稱職工程師所需要的知識都在這裡了。

我每天讀 8~12 小時的書,這樣持續了好幾個月。這是我的故事:為什麼我為了 Google 面試而讀了 8 個月

在這份 To-do list 內的主題會讓你擁有足夠的知識去面對幾乎每家軟體公司的專業面試, 這些公司包含了科技巨獸,例如 Amazon、Facebook、Google,或者是 Microsoft。

祝你好運!

翻譯:
正在翻譯的項目:

Become a sponsor and support Coding Interview University!


What is it?

這是我為了從一個網頁開發者(自學,並且沒有任何與資工、電腦科學有關的學位),成為一個大公司軟體工程師,持續好幾個月的讀書計畫。

Coding at the whiteboard - from HBO's Silicon Valley

這是為了那些新手軟體工程師,或者是那些想要轉換跑道,從軟體/網頁開發者轉為軟體工程師(需要資工、電腦科學的知識)的人。

請注意就算你有多年的軟體/網頁開發經驗,那些著名的大型軟體公司,像是 Google、Amazon、Facebook,或是 Microsoft 事實上把軟體/網頁開發(Software/Web Development)與軟體工程(Software Engineering)視為不同,而後者需要的是電腦科學/資訊工程的知識。

如果你想成為一個可靠的工程師或者是 Operation Engineer,閱讀並且學習更多這份清單中的 The Optional List(裡面包含網路與資訊安全的知識)。


目錄

---------------- 以下皆為選讀 ----------------

額外資源


Why use it?

當我開始這項計畫的時候,我不知道 Stack 與 Heap 的差別,不知道時間複雜度(Big-O),不知道樹狀結構(Tree),也不知道如何遍歷一個圖(Graph)。過去如果我需要寫一個排序演算法(Sorting Algorithm),那個 code 一定是個災難。我過去都用程式語言中內建的資料結構(Data Structure),對於資料結構裡面的實作方法跟原理我完全沒有任何的概念。除非我的程式碰到了”out of memory”的錯誤我才會去找解決方法,否則我從不特別去花費心思管理程式中的記憶體配置。雖然我有用過多維陣列(Multidimensional Arrays)跟關聯陣列(Associative Arrays),但我從來沒有自己時做過資料結構。

這是個遠大的計畫,或許要花上你數個月的時間。如果你對其中大部分的東西已經很熟悉的話,那麼執行這項計畫所花費的時間將減少許多。

How to use it

下面每項是大綱,你需要從上到下的去理解這些大綱。

我用了 Github-flavored markdown 語法,其中包含了可以確定完成進度的任務清單。

建立一個新的 Branch 以使用 Github-flavored markdown 的勾選功能。只要在[]中打 x,像是: [x]

Fork一個branch,並且跟隨以下的指令

git clone git@github.com:<your_github_username>/coding-interview-university.git

git checkout -b progress

git remote add jwasham https://github.com/jwasham/coding-interview-university

git fetch --all

在你完成了一些目標後,在框框中打x

git add .

git commit -m "Marked x"

git rebase jwasham/main

git push --set-upstream origin progress

git push --force

更多有關 Github-flavored markdown

Don’t feel you aren’t smart enough(不要覺得自己不夠聰明)

About Video Resources(關於影片資源)

有些影片要註冊 Coursera 或者 Edx 的課程後才能觀看,也就是所謂的 MOOCs。有時候某些課程需要等待好幾個月才能註冊,這期間你無法觀看這些課程的影片。

我非常喜歡那些大學的線上課程。感謝你們幫忙加入一些免費、可隨時觀看的公開資源,像是那些線上課程的YouTube影片。

Interview Process & General Interview Prep(面試過程&面試準備)

面試時專精一種程式語言(Pick One Language for the Interview)

在面試的 coding 階段,你可以選擇任何一個你擅長的程式語言。但多數大公司僅有以下選擇:

你也可以選擇以下的程式語言,但可能會有某些限制:

我之前寫過一篇關於在面試時選擇程式語言的文章:Pick One Language for the Coding Interview

你需要非常熟練這個程式語言,並且對他非常了解。

閱讀更多有關程式語言的選擇:

程式語言相關資源

因為我正在學習 C、C++以及 Python,所以下面會出現一些有關於這些程式語言的資源。

書單(Book List)

為了節省你的時間,以下是已經縮減過的書單。

面試準備(Interview Prep)

如果你有額外的時間(If you have tons of extra time):

選擇以下其中一個:

程式語言精進

面試時你需要選擇一種程式語言(詳如上述)

以下是一些我對程式語言的建議。這邊沒有所有種類程式語言的資源,所以歡迎補充。

如果你讀過以下其中一本,你應該已經具備了所有解決 coding 問題所需要的資料結構與演算法的知識。除非你想要複習,否則你可以跳過這個計畫中所有的教學影片

額外程式語言精進資源

C++

我沒讀過這兩本書,但他們頗受好評。作者是 Sedgewick,他超讚的!

如果你有更好的 C++書籍,請告訴我。我正在蒐集全面性的資源。

Java

或者:

Python

在你開始之前

這份清單隨著時間越來越大。當然,這也同時代表我越來越難以掌握他的整體內容。

以下是一些清單內的錯誤,希望能讓你避免這些錯誤,並且有更好的學習體驗。

1. 你沒辦法記住所有事情

我看了數小時的影片,同時也寫下了大量的筆記。但過了幾個月後,大部分的東西都消失的無影無蹤。我花了三天重新看過我的筆記,並做了小字卡幫助我複習他們。

請閱讀以下的文章以免重蹈覆轍:

Retaining Computer Science Knowledge.

有人推薦給我的課程(但我還沒看過:( ): Learning how to Learn

2. 使用小字卡

為了解決剛剛提到的遺忘問題,我自己寫了一個小字卡網站。網站上可以新增兩種小字卡,一般的以及程式碼。 每一種類的小字卡都有不同的格式。

這個小字卡網站在製作時便是以行動裝置優先的方式設計的,好處是無論我在何處,我都可以在我的手機與平板上複習。

製作屬於自己的免費小字卡:

我的小字卡資料庫中包含了組合語言、Python 的小知識、機器學習以及統計。這些內容已經超出了原本他的預設。

關於小字卡:當你第一次知道答案後,別馬上把那張小字卡標記為已知。反覆複習這張小字卡,直到每次都能答對後才是真正學會了這個問題。反覆的動作會讓這個知識深深地烙印在你的腦海內。

這裡有個替代我小字卡的網站Anki,很多人向我推薦過他。這個網站用同一個字卡重複出現的方式讓你牢牢地記住他。 這個網站非常容易使用,支援多平台,並且有雲端同步功能。在 iOS 平台上收費 25 美金,其他平台免費。

這是我用 Anki 這個網站裡的格式所儲存的小字卡資料庫: https://ankiweb.net/shared/info/25173560 (感謝 @xiewenya)

3. 學習資料結構與演算法的同時,也要做一些 Coding 面試中常出現的問題

把你學過的東西應用在解題上面,否則你很快就會忘了他們。這是一個過來人的經驗談。一旦你自認學會了一個主題,像是 Linked List 之類的,打開任何一本 Coding 面試問題書籍,做一些裡面有關 Linked List 的問題。接著繼續讀後面的主題。然後,再回頭反覆做有關 Linked List、遞迴或者其他任何東西(原文為 Recursion,非 Recursive)的題目。但切記一定在讀這些資料結構、演算法的同時,也要實際去寫一些有關這些東西的題目。公司錄取你是為了能有即戰力能夠上戰場,而非一個紙上談兵的人。這邊我覺得還不錯的書籍和網站。更多: Coding Question Practice

4. 複習,複習,再複習

我自己寫了一些有關於 ASCII Code、網路 OSI 模型、Big-O(時間複雜度)等等的小抄。我有空的時候就會把他們拿出來看一看複習一下。

打 Code 累了的話就休息半個小時,並且複習你的小字卡。

5. 專注

能夠干擾你,浪費你寶貴時間的東西很多。因此,專注集中精神實在很難。放點純音樂能幫上一些忙。

這份清單沒有包含的內容

以下為普遍但沒有包含在這份清單內的技術:

每日計畫

每個主題所花費的時間都不盡相同,有些只要一天,有些需要花上數天。有些主題只有單純的知識而無包含實作。

每天我選擇下面其中一個主題,看跟該主題相關的影片,再用下面的程式語言實作:

你不需要學會所有的程式語言,你只需要專精在某個程式語言 one language for the interview.

為什麼要這樣寫 Code?

我沒有時間做每個主題中的每個東西,但我會盡力而為。

下面是我自己寫的程式碼:

你不需要記住每個演算法裡面的內容。

試試看把程式碼寫在白板或者紙上而不是電腦上。接著用一些測資來測試他。最後才用電腦來驗證。

先備知識

演算法複雜度(Algorithmic complexity) / Big-O / 漸進分析(Asymptotic analysis)

資料結構

更多

樹狀結構(Tree)

排序

這裡有15 種排序演算法的影片,如果你想對排序演算法有更多的了解,看看Additional Detail on Some Subjects裡的「排序」這個部分

圖在電腦科學中可以用來表示、處理很多問題,所以這個部分就像樹以及排序一樣篇幅很長。

更多知識

系統設計、可擴充性、資料處理

如果你已經擁有了 4 年以上的程式經驗,那你可以來看看有關系統設計的問題


總複習

這部分我放了一些簡短的影片,觀看這些影片可以快速的複習一些重要的觀念。
如果你想時常複習,那真是太棒了!

解題練習

現在你已經知道上面所有有關電腦科學的主題了,該是時候做些解題的練習了。

解題練習不能死記題目的解法

為什麼你需要練習解題:

這裡有個很棒的入門教學,內容是如何在面試中有條不紊,並且有互動溝通地解決問題。這種能力可以從面試書籍中獲得,但我覺得這個也超讚的:Algorithm design canvas

家裡沒有白板嗎?這很合理。但我是個奇怪的人,家裡有個大白板。沒有白板的話,可以去美術社買個大的繪圖板。你可以坐在沙發上練習。這是我的「沙發白板」。我在照片中放了一枝筆當作比例尺。如果你用筆的話,你將會希望你可以擦拭他,因為他很快就會變髒了。通常我都用鉛筆與橡皮擦。

my sofa whiteboard

補充:

閱讀並解題(按照以下順序):

看看上方的書單

解題練習/挑戰

學了一些東西之後,可以開始試試每天解一些題目,越多越好!

Coding 面試題目影片:

解題網站:

解題 repository:

更多面試:

面試前夕

你的履歷

想想面試時可能的狀況

一些我預想的問題(我或許已經知道答案,但想知道他們的意見或是團隊的觀點):

一旦你得到工作

恭喜!!!

繼續學習

活到老,學到老。


*****************************************************************************************************
*****************************************************************************************************

下面的東西都是額外的。
讀這些東西,可以更了解電腦科學的概念,
並且能讓自己對任何軟體工程的工作做更好的準備。
如此一來,你將會成為一個更全面的軟體工程師。

*****************************************************************************************************
*****************************************************************************************************

選修書籍

你可以從以下的書單挑選你有興趣的主題來研讀

額外學習

我把他們加了進來為了讓你成為更全方位的軟體工程師,並且留意一些科技以及演算法,讓你的資料庫中有更多素材。

某些主題的額外知識

我為了強化某些已經在上面呈現的內容,所以才增加這些東西。但因為上面已經有太多內容了,所以不想把這些放在上面。
You want to get hired in this century, right?

影片系列

坐下來享受一下”Netflix 和技巧” :P

電腦科學課程

論文

LICENSE

CC-BY-SA-4.0

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.

I studied about 8-12 hours a day, for several months. This is my story: Why I studied full-time for 8 months for a Google interview

Please Note: You won’t need to study as much as I did. I wasted a lot of time on things I didn’t need to know. More info about that below. I’ll help you get there without wasting your precious time.

The items listed here will prepare you well for a technical interview at just about any software company, including the giants: Amazon, Facebook, Google, and Microsoft.

Best of luck to you!

Translations:
Translations in progress:

Become a sponsor and support Coding Interview University!


What is it?

Coding at the whiteboard - from HBO's Silicon Valley

This is my multi-month study plan for becoming a software engineer for a large company.

Required:

Note this is a study plan for software engineering, not frontend engineering or fullstack development. There are really super roadmaps and coursework for those career paths elsewhere (see https://roadmap.sh/ for more info).

There is a lot to learn in a university Computer Science program, but only knowing about 75% is good enough for an interview, so that’s what I cover here. For a complete CS self-taught program, the resources for my study plan have been included in Kamran Ahmed’s Computer Science Roadmap: https://roadmap.sh/computer-science


Table of Contents

The Study Plan

Topics of Study

Getting the Job

---------------- Everything below this point is optional ----------------

Optional Extra Topics & Resources


Why use it?

If you want to work as a software engineer for a large company, these are the things you have to know.

If you missed out on getting a degree in computer science, like I did, this will catch you up and save four years of your life.

When I started this project, I didn’t know a stack from a heap, didn’t know Big-O anything, or anything about trees, or how to traverse a graph. If I had to code a sorting algorithm, I can tell ya it would have been terrible. Every data structure I had ever used was built into the language, and I didn’t know how they worked under the hood at all. I 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 used a few multidimensional arrays in my life and thousands of associative arrays, but I 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

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 track progress.

If you don’t want to use git

On this page, click the Code button near the top, then click “Download ZIP”. Unzip the file and you can work with the text files.

If you’re open in a code editor that understands markdown, you’ll see everything formatted nicely.

How to download the repo as a zip file

If you’re comfortable with git

Create a new branch so you can check items like this, just put an x in the brackets: [x]

  1. Fork the GitHub repo: https://github.com/jwasham/coding-interview-university by clicking on the Fork button.

    Fork the GitHub repo

  2. Clone to your local repo:

    git clone https://github.com/<YOUR_GITHUB_USERNAME>/coding-interview-university.git
    cd coding-interview-university
    git remote add upstream https://github.com/jwasham/coding-interview-university.git
    git remote set-url --push upstream DISABLE  # so that you don't push your personal progress back to the original repo
  3. Mark all boxes with X after you completed your changes:

    git commit -am "Marked personal progress"
    git pull upstream main  # keep your fork up-to-date with changes from the original repo
    
    git push # just pushes to your fork

Don’t feel you aren’t smart enough

A Note About Video Resources

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.

It would be great to replace the online course resources with free and always-available public sources, such as YouTube videos (preferably university lectures), so that you people can study these anytime, not just when a specific online course is in session.

Choose a Programming Language

You’ll need to choose a programming language for the coding interviews you do, but you’ll also need to find a language that you can use to study computer science concepts.

Preferably the language would be the same, so that you only need to be proficient in one.

For this Study Plan

When I did the study plan, I used 2 languages for most of it: C and Python

This is my preference. You do what you like, of course.

You may not need it, but here are some sites for learning a new language:

For your Coding Interview

You can use a language you are comfortable in to do the coding part of the interview, but for large companies, these are solid choices:

You could also use these, but read around first. There may be caveats:

Here is an article I wrote about choosing a language for the interview: Pick One Language for the Coding Interview. This is the original article my post was based on: Choosing a Programming Language for Interviews

You need to be very comfortable in the language and be knowledgeable.

Read more about choices:

See language-specific resources here

Books for Data Structures and Algorithms

This book will form your foundation for computer science.

Just choose one, in a language that you will be comfortable with. You’ll be doing a lot of reading and coding.

C

Python

Java

Your choice:

C++

Your choice:

Interview Prep Books

You don’t need to buy a bunch of these. Honestly “Cracking the Coding Interview” is probably enough, but I bought more to give myself more practice. But I always do too much.

I bought both of these. They gave me plenty of practice.

If you have tons of extra time:

Choose one:

Don’t Make My Mistakes

This list grew over many months, and yes, it got out of hand.

Here are some mistakes I made so you’ll have a better experience. And you’ll save months of time.

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. I didn’t need all of that knowledge.

Please, read so you won’t make my mistakes:

Retaining Computer Science Knowledge.

2. Use Flashcards

To solve the problem, I made a little flashcards site where I could add flashcards of 2 types: general and code. Each card has different formatting. I made a mobile-first website, so I could review on my phone or tablet, wherever I am.

Make your own for free:

I DON’T RECOMMEND using my flashcards. There are too many and most of them are trivia that you don’t need.

But if you don’t want to listen to me, here you go:

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.

My flashcard database in Anki format: https://ankiweb.net/shared/info/25173560 (thanks @xiewenya).

Some students have mentioned formatting issues with white space that can be fixed by doing the following: open deck, edit card, click cards, select the “styling” radio button, add the member “white-space: pre;” to the card class.

3. Do Coding Interview Questions While You’re Learning

THIS IS VERY IMPORTANT.

Start doing coding interview questions while you’re learning data structures and algorithms.

You need to apply what you’re learning to solving problems, or you’ll forget. I made this mistake.

Once you’ve learned a topic, and feel somewhat comfortable with it, for example, linked lists:

  1. Open one of the coding interview books (or coding problem websites, listed below)
  2. Do 2 or 3 questions regarding linked lists.
  3. Move on to the next learning topic.
  4. Later, go back and do another 2 or 3 linked list problems.
  5. Do this with each new topic you learn.

Keep doing problems while you’re learning all this stuff, not after.

You’re not being hired for knowledge, but how you apply the knowledge.

There are many resources for this, listed below. Keep going.

4. Focus

There are a lot of distractions that can take up valuable time. Focus and concentration are hard. Turn on some music without lyrics and you’ll be able to focus pretty well.

What you won’t see covered

These are prevalent technologies but not part of this study plan:

The Daily Plan

This course goes over a lot of subjects. Each will probably take you a few days, or maybe even a week or more. It depends on your schedule.

Each day, take the next subject in the list, watch some videos about that subject, and then write an implementation of that data structure or algorithm in the language you chose for this course.

You can see my code here:

You don’t need to memorize every algorithm. You just need to be able to understand it enough to be able to write your own implementation.

Coding Question Practice

Why is this here? I'm not ready to interview.

Then go back and read this.

Why you need to practice doing programming problems:

There is a great intro for methodical, communicative problem solving in an interview. You’ll get this from the programming interview books, too, but I found this outstanding: Algorithm design canvas

Write code on a whiteboard or paper, not a computer. Test with some sample inputs. Then type it and test it out on a computer.

If you don’t have a whiteboard at home, pick up a large drawing pad from an art store. You can sit on the couch and practice. This is my “sofa whiteboard”. I added the pen in the photo just for scale. If you use a pen, you’ll wish you could erase. Gets messy quick. I use a pencil and eraser.

my sofa whiteboard

Coding question practice is not about memorizing answers to programming problems.

Coding Problems

Don’t forget your key coding interview books here.

Solving Problems:

Coding Interview Question Videos:

Challenge/Practice sites:

Let’s Get Started

Alright, enough talk, let’s learn!

But don’t forget to do coding problems from above while you learn!

Algorithmic complexity / Big-O / Asymptotic analysis

Well, that’s about enough of that.

When you go through “Cracking the Coding Interview”, there is a chapter on this, and at the end there is a quiz to see if you can identify the runtime complexity of different algorithms. It’s a super review and test.

Data Structures

More Knowledge

Trees

Sorting

As a summary, here is a visual representation of 15 sorting algorithms. If you need more detail on this subject, see “Sorting” section in Additional Detail on Some Subjects

Graphs

Graphs can be used to represent many problems in computer science, so this section is long, like trees and sorting were.

Even More Knowledge


Final Review

This section will have shorter videos that you can watch pretty quickly to review most of the important concepts.
It's nice if you want a refresher often.

Update Your Resume

Interview Process & General Interview Prep

Mock Interviews:

Be thinking of for when the interview comes

Think of about 20 interview questions you’ll get, along with the lines of the items below. Have at least one answer for each. Have a story, not just data, about something you accomplished.

Have questions for the interviewer

Some of mine (I already may know the answers, but want their opinion or team perspective):

Once You’ve Got The Job

Congratulations!

Keep learning.

You’re never really done.


*****************************************************************************************************
*****************************************************************************************************

Everything below this point is optional. It is NOT needed for an entry-level interview.
However, by studying these, you'll get greater exposure to more CS concepts, and will be better prepared for
any software engineering job. You'll be a much more well-rounded software engineer.

*****************************************************************************************************
*****************************************************************************************************

Additional Books

These are here so you can dive into a topic you find interesting.

System Design, Scalability, Data Handling

You can expect system design questions if you have 4+ years of experience.

Additional Learning

I added them to help you become a well-rounded software engineer, and to be aware of certain
technologies and algorithms, so you'll have a bigger toolbox.

Additional Detail on Some Subjects

I added these to reinforce some ideas already presented above, but didn't want to include them
above because it's just too much. It's easy to overdo it on a subject.
You want to get hired in this century, right?

Video Series

Sit back and enjoy.

Computer Science Courses

Algorithms implementation

Papers

LICENSE

CC-BY-SA-4.0