Stored here are the test codes during my learning process, mainly about C++, data structures and algorithms. The rest are test codes for learning some new tools in C++, such as test codes for the ncurses library and so on.
The environment is divided into two types: Linux and Windows.
Some test codes when learning C++
The tree implemented here is actually a BST(Binary Search Tree).
Here is the code to visualize the tree from StackOverflow: https://stackoverflow.com/questions/36802354/print-binary-tree-in-a-pretty-way-using-c
After you include the header file, use the Dump() function.
template void Dump(const BinaryTree &tree);
The topic and analysis I did on LeetCode.
106.ConstructBinaryTreefromInorderandPostorderTraversal
17.LetterCombinationsOfaPhoneNumber
93.RestoreIPAddress_unfinished
131.PalindromePartitioning(unfinished)
- 200.Number_Of_Islands:
200.Number_Of_Islands_Union_Find
797.All_Paths_From_Source_To_Target
- 128:
128.Longest_Consecutive_Sequence
128.Longest_Consecutive_Sequence_Another
- 200:
200.Number_Of_Islands_Union_Find
- 261:
261.Graph_Vaild_Tree_Union_Find
- 305:
305.Number_Of_Islands_II_Union_Find
416.Partition_Equal_Subset_Sum
459.Repeated_Substring_Pattern
Some test code about the ncurses library