线程,由线程ID,当前指令指针,寄存器集合,以及堆栈组成。一个进程内可以包含多个线程,线程之间可以共享资源
Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes’ values.
堆排序
发表于
|
分类于
Study Notes
,
Sort
,
Heapsort
The heapsort algorithm involves preparing the list by first turning it into a max heap. The algorithm then repeatedly swaps the first value of the list with the last value, decreasing the range of values considered in the heap operation by one, and sifting the new first value into its position in the heap. This repeats until the range of considered values is one value in length. - - - - wikipedia
快速排序
发表于
|
分类于
Study Notes
,
Sort
,
Quicksort
Quicksort is a divide and conquer algorithm. Quicksort first divides a large array into two smaller sub-arrays: the low elements and the high elements. Quicksort can then recursively sort the sub-arrays. - - - - wikipedia
Best, worst and average case
发表于
|
分类于
Study Notes
,
Summarize