Skip to content

Latest commit

 

History

History
16 lines (16 loc) · 869 Bytes

SomePoints.md

File metadata and controls

16 lines (16 loc) · 869 Bytes

1) Generally loops are turned into recursive function when they are compiled or interpreted

2) We can concatenate two Circular linked list in O(1) Complexity

3) Empty Tree is also a valid Binary Tree

4) Height of empty Binary Tree = -1

5) If one of the traversal is Inorder then the tree constructed uniquely, otherwise not

6) If there are n nodes then 2^n-n different trees

7) Mini no. Of swap - Selection Sort

8) Quicksort on already sorted array gives worst case.

9) MergeSort is better for Linked List

● C qsort() -- Quicksort 
● C++ sort() -- Introsort ( Hybrid of Quick, Heap and MergeSort)
● C++ stable_sort() -- MergeSort
● Python sorted() -- TimSort ( Merge + Insertion Sort)

10) Formula of Min No. Of comparison required to find Min and Max of n numbers 3n/2 - 3