shuliang / grokking_algorithms_practice

Grokking algorithms practice in golang with tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grokking Algorithms Practice

Grokking Algorithms (算法图解) in golang, with tests. Official repo.

Table of contents

Ch01 - introduction

Ch02 - selection sort

Ch03 - recursion

Ch04 - quick sort

Ch05 - hash table

Ch06 - breadth-first search

Ch07 - Dijkstra’s algorithm

graph1

./07_dijkstra_algo/graph1.png

graph2

./07_dijkstra_algo/graph2.png

graph3

./07_dijkstra_algo/graph3.png

graph4

./07_dijkstra_algo/graph4.png

graph5

./07_dijkstra_algo/graph5.png

Ch08 - greedy algorithm

Ch09 - dynamic programming

cell[i][j] = max(cell[i-1][j], value[i] + cell[i-1][j-weight[i]])

traveling

时间评分0.511.52
0.57威斯敏斯特教堂7777
0.56环球剧场76+76+76+7
19英国国家美术馆76+79+79+6+7
29大英博物馆76+79+79+6+7
0.58圣保罗大教堂88+78+6+78+9+7

camping package

重量价值123456
310xx10101010
1333103+103+103+10
29食物399+39+39+109+3+10
25夹克399+35+99+109+3+10
16相机66+36+96+9+36+5+96+9+10

longest common subsequence

09 longest

Ch10 - k-nearest neighbours

Ch11 - next

About

Grokking algorithms practice in golang with tests

License:MIT License


Languages

Language:Go 100.0%