コーディングインタビュー大学
私はもともと、ソフトウェアエンジニアになるための研究トピックの短いやることリストとしてこれを作成しましたが、今日見られる大きなリストに成長しました。この研究計画を経て、Amazonのソフトウェア開発エンジニアとして採用されました!おそらく私ほど勉強する必要はないでしょう。とにかく、必要なものはすべてここにあります。
私は数ヶ月間、1日約8〜12時間勉強しました。これが私の話です:Googleのインタビューのために8か月間フルタイムで勉強した理由
注意:私ほど勉強する必要はありません。知る必要のないことに多くの時間を無駄にしました。詳細については、以下をご覧ください。貴重な時間を無駄にすることなく、そこにたどり着くお手伝いをします。
ここにリストされている項目は、Amazon、Facebook、Google、Microsoftなどの巨人を含むほぼすべてのソフトウェア会社での技術面接の準備になります。
幸運を祈ります!
翻訳:
進行中の翻訳:
それは何ですか?

これは、大企業のソフトウェアエンジニアになるための私の数か月にわたる研究計画です。
必須:
- コーディングの経験(変数、ループ、メソッド/関数など)
- 忍耐
- 時間
これはソフトウェアエンジニアリングの研究計画であり、Web開発ではないことに注意してください。Google、Amazon、Facebook、Microsoftなどの大規模なソフトウェア会社は、ソフトウェアエンジニアリングをWeb開発とは異なるものと見なしています。たとえば、Amazonにはフロントエンドエンジニア(FEE)とソフトウェア開発エンジニア(SDE)がいます。これらは2つの別々の役割であり、それぞれが独自の能力を持っているため、それらの面接は同じではありません。これらの企業は、ソフトウェア開発/エンジニアリングの役割のためにコンピュータサイエンスの知識を必要としています。
目次
研究計画
研究のトピック
仕事を得る
----------------このポイントより下のすべてはオプションです----------------
オプションの追加トピックとリソース
なぜそれを使うのですか?
大企業のソフトウェアエンジニアとして働きたいのなら、これらはあなたが知らなければならないことです。
私のようにコンピュータサイエンスの学位を取得できなかった場合、これはあなたに追いつき、あなたの人生の4年を救うでしょう。
このプロジェクトを開始したとき、私はヒープからのスタックを知りませんでした。Big-Oについても、木についても、グラフをトラバースする方法についても何も知りませんでした。ソートアルゴリズムをコーディングしなければならなかったとしたら、それはひどいことだったと言えます。私がこれまでに使用したすべてのデータ構造は言語に組み込まれており、それらが内部でどのように機能するかはまったくわかりませんでした。実行中のプロセスで「メモリ不足」エラーが発生しない限り、メモリを管理する必要はありませんでした。その後、回避策を見つける必要がありました。私は人生でいくつかの多次元配列と数千の連想配列を使用しましたが、データ構造を最初から作成することはありませんでした。
それは長い計画です。数ヶ月かかる場合があります。あなたがすでにこれの多くに精通しているならば、それはあなたにずっと少ない時間しかかからないでしょう。
それの使い方
以下はすべて概要であり、上から下に向かって順番に取り組む必要があります。
進行状況を追跡するためのタスクリストなど、GitHubの特別なマークダウンフレーバーを使用しています。
gitを使いたくない場合
このページで、上部にある[コード]ボタンをクリックしてから、[ZIPをダウンロード]をクリックします。ファイルを解凍すると、テキストファイルを操作できます。
マークダウンを理解するコードエディタで開いている場合は、すべてが適切にフォーマットされていることがわかります。

gitに慣れている場合
新しいブランチを作成して、次のような項目を確認できるようにします。角かっこにxを入れるだけです:[x]
Fork a branch and follow the commands below
[フォーク]ボタンをクリックして、GitHubリポジトリhttps://github.com/jwasham/coding-interview-universityをフォークします。
ローカルリポジトリにクローンを作成します。
git clone [email protected]:<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
あなたが十分に賢くないと感じないでください
ビデオリソースに関するメモ
一部のビデオは、CourseraまたはEdXクラスに登録することによってのみ利用できます。これらはMOOCと呼ばれます。クラスがセッション中でない場合があるため、数か月待たなければならず、アクセスできません。
オンラインコースのリソースを、YouTubeビデオ(できれば大学の講義)などの無料でいつでも利用できる公開ソースに置き換えて、特定のオンラインコースがセッション中だけでなく、いつでもこれらを学習できるようにすると便利です。
プログラミング言語を選択する
コーディングインタビューではプログラミング言語を選択する必要がありますが、コンピュータサイエンスの概念を研究するために使用できる言語も見つける必要があります。
できれば言語は同じであることが望ましいので、1つに習熟していれば十分です。
この研究計画のために
研究計画を立てたとき、私はそのほとんどにCとPythonの2つの言語を使用しました。
- C:非常に低いレベルです。ポインタとメモリの割り当て/割り当て解除を処理できるため、データ構造とアルゴリズムを骨の中に感じることができます。PythonやJavaのような高級言語では、これらはあなたから隠されています。日常業務では、それは素晴らしいことですが、これらの低レベルのデータ構造がどのように構築されているかを学ぶときは、金属に親しみを感じるのは素晴らしいことです。
- Cはいたるところにあります。勉強している間、どこでも本、講義、ビデオで例を見るでしょう。
-
Cプログラミング言語、第2巻
- これは短い本ですが、C言語をうまく理解できるようになり、少し練習すればすぐに習熟できます。Cを理解すると、プログラムとメモリがどのように機能するかを理解するのに役立ちます。
- あなたは本の奥深くに行く必要はありません(あるいはそれを終える必要さえありません)。Cで読み書きできる場所にたどり着くだけです。
- 本の中の質問への回答
- Python:現代的で非常に表現力豊かで、非常に便利で、インタビューで書くコードを減らすことができるので、私はそれを学びました。
これが私の好みです。もちろん、あなたは好きなことをします。
あなたはそれを必要としないかもしれません、しかしここに新しい言語を学ぶためのいくつかのサイトがあります:
あなたのコーディングインタビューのために
面接のコーディング部分を行うのに慣れている言語を使用できますが、大企業の場合、これらは確かな選択です。
これらを使用することもできますが、最初に読んでください。警告があるかもしれません:
これが私がインタビューのための言語の選択について書いた記事です:
コーディングインタビューのために1つの言語を選んでください。これは私の投稿が基づいていた元の記事です:インタビューのためのプログラミング言語の選択
あなたはその言語に非常に慣れていて、知識が豊富である必要があります。
選択肢についてもっと読む:
ここで言語固有のリソースを参照してください
データ構造とアルゴリズムの本
この本は、コンピュータサイエンスの基礎を形成します。
使いやすい言語で1つ選択してください。あなたはたくさんの読書とコーディングをするでしょう。
C
Python
Java
あなたの選択:
- グッドリッチ、タマシア、ゴールドワッサー
- セジウィックとウェイン:
- アルゴリズム
- 本をカバーする無料のCourseraコース(著者によって教えられました!):
C ++
あなたの選択:
- グッドリッチ、タマシア、マウント
- セジウィックとウェイン
面接準備本
これらをたくさん購入する必要はありません。正直なところ「コーディングインタビューのクラッキング」で十分かもしれませんが、もっと練習するためにもっと購入しました。しかし、私はいつもやりすぎです。
両方購入しました。彼らは私にたくさんの練習をしてくれました。
延長戦がたくさんある場合:
次のいずれかを選択してください。
私の間違いをしないでください
このリストは何ヶ月にもわたって増えていきましたが、そうです、手に負えなくなりました。
ここに私が犯したいくつかの間違いがありますので、あなたはより良い経験をするでしょう。そして、あなたは何ヶ月もの時間を節約するでしょう。
1.あなたはそれをすべて覚えていない
私は何時間ものビデオを見て、たくさんのメモを取りました、そして数ヶ月後、私は覚えていないことがたくさんありました。私は3日間メモを読み、フラッシュカードを作成したので、確認することができました。私はその知識のすべてを必要としませんでした。
私の間違いを犯さないように読んでください:
コンピュータサイエンスの知識を保持する。
2.フラッシュカードを使用する
この問題を解決するために、一般とコードの2種類のフラッシュカードを追加できる小さなフラッシュカードサイトを作成しました。カードごとにフォーマットが異なります。モバイルファーストのウェブサイトを作成したので、どこにいても携帯電話やタブレットで確認できました。
無料で自分のものを作りましょう:
フラッシュカードの使用はお勧めしません。あまりにも多く、それらの多くはあなたが必要としない雑学です。
しかし、あなたが私に耳を傾けたくないのなら、ここに行きます:
私は船外に出て、アセンブリ言語やPythonの雑学から機械学習や統計まで、すべてをカバーするカードを持っていることを覚えておいてください。必要なものには多すぎます。
フラッシュカードに関する注意:答えを知っていることに初めて気付いたときは、それを既知としてマークしないでください。あなたが本当にそれを知る前に、あなたは同じカードを見て、それを数回正しく答えなければなりません。繰り返しは、その知識をあなたの脳の奥深くに置きます。
私のフラッシュカードサイトを使用する代わりに、Ankiがあります。これは私に何度も勧められています。それはあなたが覚えるのを助けるために繰り返しシステムを使用します。ユーザーフレンドリーで、すべてのプラットフォームで利用でき、クラウド同期システムを備えています。iOSでは25ドルかかりますが、他のプラットフォームでは無料です。
Anki形式のフラッシュカードデータベース:https ://ankiweb.net/shared/info/25173560 (@xiewenyaに感謝)。
一部の学生は、次の手順で修正できる空白のフォーマットの問題について言及しています。デッキを開き、カードを編集し、カードをクリックし、[スタイリング]ラジオボタンを選択し、メンバー「空白:pre;」を追加します。カードクラスに。
3.学習中に面接の質問をコーディングする
これはとても重要です。
データ構造とアルゴリズムを学習しながら、面接の質問のコーディングを開始します。
学んだことを問題解決に応用する必要があります。そうしないと忘れてしまいます。私はこの間違いをしました。
トピックを学習し、それをある程度快適に感じたら、たとえば、リンクリスト:
- コーディングインタビューブック(または以下にリストされているコーディング問題のWebサイト)の1つを開きます。
- リンクリストに関して2つまたは3つの質問をします。
- 次の学習トピックに進みます。
- 後で戻って、別の2つまたは3つのリンクリストの問題を実行します。
- あなたが学ぶそれぞれの新しいトピックでこれをしてください。
後ではなく、これらすべてのことを学んでいる間、問題を続けてください。
あなたは知識のために雇われているのではなく、知識をどのように適用するかです。
これには多くのリソースがあり、以下にリストされています。立ち止まるな。
4.フォーカス
貴重な時間を費やす可能性のある気晴らしがたくさんあります。集中力と集中力は難しいです。歌詞のない音楽をオンにすると、かなり集中できるようになります。
カバーされていないもの
これらは普及しているテクノロジーですが、この調査計画の一部ではありません。
- SQL
- Javascript
- HTML、CSS、およびその他のフロントエンドテクノロジー
デイリープラン
このコースは多くの科目をカバーしています。それぞれにおそらく数日、あるいは1週間以上かかるでしょう。それはあなたのスケジュールに依存します。
毎日、リストの次の主題を取り上げ、その主題に関するビデオをいくつか見てから、このコースで選択した言語でそのデータ構造またはアルゴリズムの実装を記述します。
あなたはここで私のコードを見ることができます:
すべてのアルゴリズムを覚える必要はありません。独自の実装を作成できるように、それを十分に理解できる必要があります。
コーディング質問練習
Why is this here? I'm not ready to interview.
その後、戻ってこれを読んでください。
プログラミングの問題を練習する必要がある理由:
- 問題の認識、および適切なデータ構造とアルゴリズムが適合する場所
- 問題の要件を収集する
- 面接のように問題を解決する方法を話します
- コンピューターではなく、ホワイトボードまたは紙でのコーディング
- ソリューションの時間とスペースの複雑さを考え出す(以下のBig-Oを参照)
- ソリューションのテスト
面接では、系統的でコミュニケーション的な問題解決のための素晴らしいイントロがあります。これはプログラミングのインタビューの本からも得られますが、私はこれが傑出していることを発見しました:
アルゴリズム設計キャンバス
コンピューターではなく、ホワイトボードまたは紙にコードを記述します。いくつかのサンプル入力でテストします。次に、それを入力して、コンピューターでテストします。
自宅にホワイトボードがない場合は、アートストアから大きな描画パッドを入手してください。ソファに座って練習することができます。これが私の「ソファホワイトボード」です。縮尺のために写真にペンを追加しました。ペンを使うなら、消せたらいいのにと思います。すぐに散らかってしまいます。鉛筆と消しゴムを使います。

質問の練習をコーディングすることは、プログラミングの問題に対する答えを覚えることではありません。
コーディングの問題
ここでキーコーディングのインタビューブックを忘れないでください。
問題を解決する:
インタビューの質問ビデオのコーディング:
チャレンジサイト:
始めましょう
さて、十分な話、学びましょう!
ただし、学習中は上からコーディングの問題を行うことを忘れないでください。
アルゴリズムの複雑さ/Big-O/漸近解析
まあ、それで十分です。
「コーディングインタビューのクラッキング」を通過すると、これに関する章があり、最後に、さまざまなアルゴリズムの実行時の複雑さを識別できるかどうかを確認するためのクイズがあります。これはスーパーレビューとテストです。
データ構造
-
配列
- []アレイについて:
- []ベクトル(自動サイズ変更を使用した可変配列)を実装します。
- []配列とポインターを使用してコーディングを練習し、ポインター計算を使用して、インデックスを使用する代わりにインデックスにジャンプします。
- []メモリが割り当てられた新しい生データ配列
- 内部でint配列を割り当てることができますが、その機能は使用しません
- 16から開始するか、開始数が大きい場合は、2〜16、32、64、128の累乗を使用します。
- [] size()-アイテムの数
- [] capacity()-保持できるアイテムの数
- [] is_empty()
- [] at(index)-指定されたインデックスでアイテムを返し、インデックスが範囲外の場合は爆発します
- [] push(item)
- [] insert(index、item)-インデックスにアイテムを挿入し、そのインデックスの値と末尾の要素を右にシフトします
- [] prepend(item)-インデックス0で上記の挿入を使用できます
- [] pop()-末尾から削除、戻り値
- [] delete(index)-インデックスのアイテムを削除し、末尾のすべての要素を左にシフトします
- [] remove(item)-値を検索し、それを保持しているインデックスを削除します(複数の場所にある場合でも)
- [] find(item)-値を検索し、その値を持つ最初のインデックスを返します。見つからない場合は-1を返します。
- [] resize(new_capacity)//プライベート関数
- 容量に達したら、サイズを2倍に変更します
- アイテムをポップするときに、サイズが容量の1/4の場合、サイズを半分に変更します
- [ ] 時間
- O(1)最後に追加/削除(より多くのスペースの割り当てのために償却)、インデックス作成、または更新
- O(n)は、他の場所に挿入/削除します
- [ ] スペース
- メモリ内で隣接しているため、近接性がパフォーマンスに役立ちます
- 必要なスペース=(配列容量、> = n)*アイテムのサイズですが、2nであっても、O(n)
-
リンクリスト
- [ ] 説明:
- [] Cコード(ビデオ)
-ビデオ全体ではなく、ノード構造体とメモリ割り当てに関する一部のみ
- []リンクリストと配列:
- []リンクリストを避けるべき理由(ビデオ)
- []お奨め:ポインタの知識へのポインタが必要です:(そのポインタが指すアドレスを変更する可能性のある関数にポインタを渡す場合)このページは、ptrからptrを把握するためのものです。このリストトラバーサルスタイルはお勧めしません。読みやすさと保守性は、巧妙さのために損なわれます。
- []実装(テールポインタありとなしで行いました):
- [] size()-リスト内のデータ要素の数を返します
- [] empty()-空の場合、boolはtrueを返します
- [] value_at(index)-n番目の項目の値を返します(最初は0から始まります)
- [] push_front(value)-リストの先頭にアイテムを追加します
- [] pop_front()-フロントアイテムを削除してその値を返します
- [] push_back(value)-最後にアイテムを追加します
- [] pop_back()-最終品目を削除し、その値を返します
- [] front()-フロントアイテムの値を取得します
- [] back()-最終品目の値を取得します
- [] insert(index、value)-インデックスに値を挿入するため、そのインデックスの現在のアイテムは、インデックスの新しいアイテムによってポイントされます
- [] Erase(index)-指定されたインデックスのノードを削除します
- [] value_n_from_end(n)-リストの最後からn番目の位置にあるノードの値を返します
- [] reverse()-リストを反転します
- [] remove_value(value)-この値を持つリストの最初のアイテムを削除します
- []二重リンクリスト
-
スタック
-
列
- []キュー(ビデオ)
- []循環バッファ/FIFO
- []テールポインタを使用して、リンクリストを使用して実装します。
- enqueue(value)-テールの位置に値を追加します
- dequeue()-値を返し、最後に追加された要素を削除します(front)
- 空の()
- []固定サイズの配列を使用して実装します。
- enqueue(value)-使用可能なストレージの最後にアイテムを追加します
- dequeue()-値を返し、最後に追加された要素を削除します
- 空の()
- 満杯()
- [ ] 料金:
- リンクリストを使用した実装では、先頭でエンキューし、末尾でデキューするのはO(n)です。これは、最後から2番目の要素が必要であり、デキューごとに完全なトラバーサルが発生するためです。
- エンキュー:O(1)(償却、リンクリストおよび配列[プロービング])
- デキュー:O(1)(リンクリストと配列)
- 空:O(1)(リンクリストと配列)
-
ハッシュ表
-
[]ビデオ:
-
[]オンラインコース:
-
[]線形プロービングを使用してアレイで実装する
- hash(k、m)-mはハッシュテーブルのサイズです
- add(key、value)-キーがすでに存在する場合は、値を更新します
- 存在する(キー)
- get(key)
- remove(key)
より多くの知識
-
二分探索
-
ビット演算
- []ビットのチートシート-(2^1から2^16および2^32)までの2の累乗の多くを知っている必要があります
- []:&、|、^、〜、>>、<<を使用してビットを操作する方法をよく理解してください。
- []2の補数と1の補数
- []セットビットをカウントします
- []スワップ値:
- [ ] 絶対値:
木
-
木-メモと背景
- []シリーズ:木(ビデオ)
- 基本的な木の建設
- トラバーサル
- 操作アルゴリズム
- [] BFS(幅優先探索)およびDFS(深さ優先探索)(ビデオ)
- BFSノート:
- レベルの順序(BFS、キューを使用)
- 時間計算量:O(n)
- スペースの複雑さ:最高:O(1)、最低:O(n / 2)= O(n)
- DFSノート:
- 時間計算量:O(n)
- スペースの複雑さ:最良:O(log n)-平均 最悪の木の高さ:O(n)
- 順番どおり(DFS:左、自己、右)
- ポストオーダー(DFS:左、右、自己)
- 事前注文(DFS:自己、左、右)
-
二分探索木:BST
- []二分探索木レビュー(ビデオ)
- []はじめに(ビデオ)
- [] MIT(ビデオ)
- C / C ++:
- [ ] 埋め込む:
- []insert//ツリーに値を挿入します
- []get_node_count//保存されている値の数を取得します
- []print_values//ツリー内の値を最小から最大まで出力します
- [] delete_tree
- []is_in_tree//指定された値がツリーに存在する場合はtrueを返します
- [] get_height //ノードの高さを返します(単一ノードの高さは1です)
- []get_min//ツリーに格納されている最小値を返します
- []get_max//ツリーに格納されている最大値を返します
- [] is_binary_search_tree
- [] delete_value
- [] get_successor//指定された値の次にツリー内で最も高い値を返します。値がない場合は-1を返します
-
ヒープ/優先キュー/バイナリヒープ
並べ替え
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
-
Recursion
Backtracking Blueprint: Java
Python
-
Dynamic Programming
- You probably won't see any dynamic programming problems in your interview, but it's worth being able to recognize a
problem as being a candidate for dynamic programming.
- This subject can be pretty difficult, as each DP soluble problem must be defined as a recursion relation, and coming up with it can be tricky.
- I suggest looking at many examples of DP problems until you have a solid understanding of the pattern involved.
- [ ] Videos:
- [ ] Yale Lecture notes:
- [ ] Coursera:
-
Design patterns
-
Combinatorics (n choose k) & Probability
-
NP, NP-Complete and Approximation Algorithms
-
How computers process a program
-
Caches
- [ ] LRU cache:
- [ ] CPU cache:
-
Processes and Threads
- [ ] Computer Science 162 - Operating Systems (25 videos):
- What Is The Difference Between A Process And A Thread?
- Covers:
- Processes, Threads, Concurrency issues
- Difference between processes and threads
- Processes
- Threads
- Locks
- Mutexes
- Semaphores
- Monitors
- How they work?
- Deadlock
- Livelock
- CPU activity, interrupts, context switching
- Modern concurrency constructs with multicore processors
- Paging, segmentation and virtual memory (video)
- Interrupts (video)
- Process resource needs (memory: code, static storage, stack, heap, and also file descriptors, i/o)
- Thread resource needs (shares above (minus stack) with other threads in the same process but each has its own pc, stack counter, registers, and stack)
- Forking is really copy on write (read-only) until the new process writes to memory, then it does a full copy.
- Context switching
- How context switching is initiated by the operating system and underlying hardware?
- [ ] threads in C++ (series - 10 videos)
- [ ] CS 377 Spring '14: Operating Systems from University of Massachusetts
- [ ] concurrency in Python (videos):
-
Testing
-
String searching & manipulations
If you need more detail on this subject, see "String Matching" section in Additional Detail on Some Subjects.
-
Tries
-
Floating Point Numbers
-
Unicode
-
Endianness
-
ネットワーキング
最終レビュー
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.
履歴書を更新する
仕事を見つける
面接プロセスと一般的な面接準備
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.
-
Why do you want this job?
-
What's a tough problem you've solved?
-
Biggest challenges faced?
-
Best/worst designs seen?
-
Ideas for improving an existing product
-
How do you work best, as an individual and as part of a team?
-
Which of your skills or experiences would be assets in the role and why?
-
What did you most enjoy at [job x / project y]?
-
What was the biggest challenge you faced at [job x / project y]?
-
What was the hardest bug you faced at [job x / project y]?
-
What did you learn at [job x / project y]?
-
What would you have done better at [job x / project y]?
-
If you find it hard to come up with good answers of these types of interview questions, here are some ideas:
Have questions for the interviewer
Some of mine (I already may know the answers, but want their opinion or team perspective):
- How large is your team?
- What does your dev cycle look like? Do you do waterfall/sprints/agile?
- Are rushes to deadlines common? Or is there flexibility?
- How are decisions made in your team?
- How many meetings do you have per week?
- Do you feel your work environment helps you concentrate?
- What are you working on?
- What do you like about it?
- What is the work life like?
- How is the work/life balance?
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.
-
The Unix Programming Environment
-
The Linux Command Line: A Complete Introduction
- TCP/IP Illustrated Series
-
Head First Design Patterns
- A gentle introduction to design patterns
-
Design Patterns: Elements of Reusable Object-Oriented Software
- AKA the "Gang Of Four" book, or GOF
- The canonical design patterns book
-
Algorithm Design Manual (Skiena)
- As a review and problem recognition
- The algorithm catalog portion is well beyond the scope of difficulty you'll get in an interview
- This book has 2 parts:
- Class textbook on data structures and algorithms
- Pros:
- Is a good review as any algorithms textbook would be
- Nice stories from his experiences solving problems in industry and academia
- Code examples in C
- Cons:
- Can be as dense or impenetrable as CLRS, and in some cases, CLRS may be a better alternative for some subjects
- Chapters 7, 8, 9 can be painful to try to follow, as some items are not explained well or require more brain than I have
- Don't get me wrong: I like Skiena, his teaching style, and mannerisms, but I may not be Stony Brook material
- Algorithm catalog:
- This is the real reason you buy this book.
- This book is better as an algorithm reference, and not something you read cover to cover.
- Can rent it on Kindle
- Answers:
- Errata
-
Write Great Code: Volume 1: Understanding the Machine
- The book was published in 2004, and is somewhat outdated, but it's a terrific resource for understanding a computer in brief
- The author invented HLA, so take mentions and examples in HLA with a grain of salt. Not widely used, but decent examples of what assembly looks like
- These chapters are worth the read to give you a nice foundation:
- Chapter 2 - Numeric Representation
- Chapter 3 - Binary Arithmetic and Bit Operations
- Chapter 4 - Floating-Point Representation
- Chapter 5 - Character Representation
- Chapter 6 - Memory Organization and Access
- Chapter 7 - Composite Data Types and Memory Objects
- Chapter 9 - CPU Architecture
- Chapter 10 - Instruction Set Architecture
- Chapter 11 - Memory Architecture and Organization
-
Introduction to Algorithms
-
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
-
Computer Architecture, Sixth Edition: A Quantitative Approach
- For a richer, more up-to-date (2017), but longer treatment
System Design, Scalability, Data Handling
You can expect system design questions if you have 4+ years of experience.
- Scalability and System Design are very large topics with many topics and resources, since
there is a lot to consider when designing a software/hardware system that can scale.
Expect to spend quite a bit of time on this
- Considerations:
- Scalability
- Distill large data sets to single values
- Transform one data set to another
- Handling obscenely large amounts of data
- System design
- features sets
- interfaces
- class hierarchies
- designing a system under certain constraints
- simplicity and robustness
- tradeoffs
- performance analysis and optimization
- [ ] START HERE: The System Design Primer
- [ ] System Design from HiredInTech
- [ ] How Do I Prepare To Answer Design Questions In A Technical Interview?
- [ ] 8 Things You Need to Know Before a System Design Interview
- [ ] Database Normalization - 1NF, 2NF, 3NF and 4NF (video)
- [ ] System Design Interview - There are a lot of resources in this one. Look through the articles and examples. I put some of them below
- [ ] How to ace a systems design interview
- [ ] Numbers Everyone Should Know
- [ ] How long does it take to make a context switch?
- [ ] Transactions Across Datacenters (video)
- [ ] A plain English introduction to CAP Theorem
- [ ] MIT 6.824: Distributed Systems, Spring 2020 (20 videos)
- [ ] Consensus Algorithms:
- [ ] Consistent Hashing
- [ ] NoSQL Patterns
- [ ] Scalability:
- [ ] Practicing the system design process: Here are some ideas to try working through on paper, each with some documentation on how it was handled in the real world:
- review: The System Design Primer
- System Design from HiredInTech
- cheat sheet
- flow:
- Understand the problem and scope:
- Define the use cases, with interviewer's help
- Suggest additional features
- Remove items that interviewer deems out of scope
- Assume high availability is required, add as a use case
- Think about constraints:
- Ask how many requests per month
- Ask how many requests per second (they may volunteer it or make you do the math)
- Estimate reads vs. writes percentage
- Keep 80/20 rule in mind when estimating
- How much data written per second
- Total storage required over 5 years
- How much data read per second
- Abstract design:
- Layers (service, data, caching)
- Infrastructure: load balancing, messaging
- Rough overview of any key algorithm that drives the service
- Consider bottlenecks and determine solutions
- Exercises:
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.
-
Compilers
-
Emacs and vi(m)
-
Unix command line tools
- I filled in the list below from good tools.
- bash
- cat
- grep
- sed
- awk
- curl or wget
- sort
- tr
- uniq
- strace
- tcpdump
-
Information theory (videos)
- Khan Academy
- More about Markov processes:
- See more in MIT 6.050J Information and Entropy series below
-
Parity & Hamming Code (videos)
-
Entropy
-
Cryptography
-
Compression
-
Computer Security
-
Garbage collection
-
Parallel Programming
-
Messaging, Serialization, and Queueing Systems
-
A *
-
高速フーリエ変換
-
ブルームフィルター
-
HyperLogLog
-
局所性鋭敏型ハッシュ
-
ヴァンエムデボアスの木
-
拡張データ構造
-
バランスの取れた探索木
-
少なくとも1つのタイプの平衡二分木を知っている(そしてそれがどのように実装されているかを知っている):
-
「バランスの取れた検索ツリーの中で、AVLツリーと2/3ツリーがパスになり、赤黒木がより人気があるようです。特に興味深い自己組織化データ構造は、回転を使用してアクセスしたキーをに移動するスプレイツリーです。根。" -スキーナ
-
Of these, I chose to implement a splay tree. From what I've read, you won't implement a
balanced search tree in your interview. But I wanted exposure to coding one up
and let's face it, splay trees are the bee's knees. I did read a lot of red-black tree code
- Splay tree: insert, search, delete functions
If you end up implementing red/black tree try just these:
- Search and insertion functions, skipping delete
-
I want to learn more about B-Tree since it's used so widely with very large data sets
-
Self-balancing binary search tree
-
AVL trees
- In practice:
From what I can tell, these aren't used much in practice, but I could see where they would be:
The AVL tree is another structure supporting O(log n) search, insertion, and removal. It is more rigidly
balanced than red–black trees, leading to slower insertion and removal but faster retrieval. This makes it
attractive for data structures that may be built once and loaded without reconstruction, such as language
dictionaries (or program dictionaries, such as the opcodes of an assembler or interpreter)
- MIT AVL Trees / AVL Sort (video)
- AVL Trees (video)
- AVL Tree Implementation (video)
- Split And Merge
-
Splay trees
- In practice:
Splay trees are typically used in the implementation of caches, memory allocators, routers, garbage collectors,
data compression, ropes (replacement of string used for long text strings), in Windows NT (in the virtual memory,
networking and file system code) etc
- CS 61B: Splay Trees (video)
- MIT Lecture: Splay Trees:
- Gets very mathy, but watch the last 10 minutes for sure.
- Video
-
Red/black trees
- These are a translation of a 2-3 tree (see below).
- In practice:
Red–black trees offer worst-case guarantees for insertion time, deletion time, and search time.
Not only does this make them valuable in time-sensitive applications such as real-time applications,
but it makes them valuable building blocks in other data structures which provide worst-case guarantees;
for example, many data structures used in computational geometry can be based on red–black trees, and
the Completely Fair Scheduler used in current Linux kernels uses red–black trees. In the version 8 of Java,
the Collection HashMap has been modified such that instead of using a LinkedList to store identical elements with poor
hashcodes, a Red-Black tree is used
- Aduni - Algorithms - Lecture 4 (link jumps to starting point) (video)
- Aduni - Algorithms - Lecture 5 (video)
- Red-Black Tree
- An Introduction To Binary Search And Red Black Tree
-
2-3 search trees
-
2-3-4 Trees (aka 2-4 trees)
- In practice:
For every 2-4 tree, there are corresponding red–black trees with data elements in the same order. The insertion and deletion
operations on 2-4 trees are also equivalent to color-flipping and rotations in red–black trees. This makes 2-4 trees an
important tool for understanding the logic behind red–black trees, and this is why many introductory algorithm texts introduce
2-4 trees just before red–black trees, even though 2-4 trees are not often used in practice.
- CS 61B Lecture 26: Balanced Search Trees (video)
- Bottom Up 234-Trees (video)
- Top Down 234-Trees (video)
-
N-ary (K-ary, M-ary) trees
- note: the N or K is the branching factor (max branches)
- binary trees are a 2-ary tree, with branching factor = 2
- 2-3 trees are 3-ary
- K-Ary Tree
-
B-Trees
-
k-D Trees
-
Skip lists
-
Network Flows
-
Disjoint Sets & Union Find
-
Math for Fast Processing
-
Treap
-
Linear Programming (videos)
-
Geometry, Convex hull (videos)
-
Discrete math
-
Machine Learning
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?
-
SOLID
-
Union-Find
-
More Dynamic Programming (videos)
-
Advanced Graph Processing (videos)
-
MIT Probability (mathy, and go slowly, which is good for mathy things) (videos):
-
Simonson: Approximation Algorithms (video)
-
String Matching
- Rabin-Karp (videos):
- Knuth-Morris-Pratt (KMP):
- Boyer–Moore string search algorithm
-
Coursera: Algorithms on Strings
- starts off great, but by the time it gets past KMP it gets more complicated than it needs to be
- nice explanation of tries
- can be skipped
-
Sorting
- Stanford lectures on sorting:
- Shai Simonson, Aduni.org:
- Steven Skiena lectures on sorting:
Video Series
Sit back and enjoy.
コンピュータサイエンスコース
アルゴリズムの実装
論文
ライセンス
CC-BY-SA-4.0