Skip to content

Instantly share code, notes, and snippets.

@david-shiko
Last active February 13, 2022 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save david-shiko/c80e89f778df03c67ae5dfde7da7adf3 to your computer and use it in GitHub Desktop.
Save david-shiko/c80e89f778df03c67ae5dfde7da7adf3 to your computer and use it in GitHub Desktop.
Grokking Algorithms notes
Сввязанный список - Быстрое изменение, медленное чтение
Массив - Быстрое чтение, медленное изменение
Binary tree - бесполезная структура если к ней не применяются какие-то правила (балансировка ,сортировка и т.п.)
Binary tree search - отсортированное бинарное дерево
A map is an immutable tree-based data structure where most operations take time logarithmic in the size of the map, whereas a hash table is a mutable data structure where most operations have constant time complexity
Алгоритм "поиск в ширину" (Breadth First Search, BFS) - кратчайший путь для графа.
Алгоритм дейкстры - кратчайший путь для направленного графа без веса
Алгоритм Беллмана—Форда - кратчайший путь для направленного (?) графа с отрицательным весом.
max_acailable_system_number = float("inf") - Получить максимально доступное число (что бы не писать 9999...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment