Skip to content

This repo records some interesting algorithm execises.

Notifications You must be signed in to change notification settings

FinixLei/algorithm

Repository files navigation

This repo for collecting the basic and classic algorithm problems and solutions. It does not collect all the LeetCode problems; It just tries to collect the typical algorithm problems.


01_排序

  • 合并排序
  • 冒泡排序
  • 堆排序
  • 普通快速排序

01_链表

  • 单链表的快速排序
  • 递归反转链表
  • 非递归反转链表

02_树

  • 树的层次序打印
  • 三种树的遍历
  • 树的深度优先搜索
  • 寻找二叉树中2个节点的最低公共祖先节点

03_栈

  • 快速排序的栈实现

04_递归

  • 递归寻找二叉树中2个节点的最低公共祖先节点

05_回溯

  • 八皇后问题
  • 单词根据字典变形

06_动态规划

  • 三道动态规划
  • 用动态规划解决单词变形

07_全排列问题

  • 经典全排列
  • 允许重复的全排列
  • 不允许重复的m取n全排列

99_其他经典

  • 依赖链问题
  • 求平方根
  • 高楼扔鸡蛋
  • 丢手帕
.
├── 01_LlinkedList
│   ├── quick_sort_single_list.cpp
│   └── reverse_linkedlist.cpp
├── 02_Tree
│   ├── find_shared_ancestor.cpp
│   ├── layer_print_tree.cpp
│   ├── print_tree.cpp
│   └── tree_dfs.cpp
├── 03_Stack
│   └── quick_sort_by_stack.cpp
├── 11_Sort
│   ├── bubble_sort.cpp
│   ├── heap_sort.cpp
│   ├── merge_sort.cpp
│   └── normal_quick_sort.cpp
├── 12_Recursive
│   └── seek_common_ancestor_in_tree.cpp
├── 13_Backtracking
│   ├── convert_string.cpp
│   └── queens.cpp
├── 14_DP
│   └── word_edit_distance.cpp
├── 15_Permutation
│   ├── allow_duplicatedl_list_all.cpp
│   ├── classic_list_all.cpp
│   └── list_n_of_m_without_dup.cpp
├── 99_OtherClassic
│   ├── Greedy
│   │   ├── bag.cpp
│   │   └── greedy.cpp
│   └── sqrt.cpp
└── README.md

10 directories, 22 files

About

This repo records some interesting algorithm execises.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages