|
50 | 50 | - [Find Median Values (With Merge Sort Algorithm)](#find-median-values-with-merge-sort-algorithm)
|
51 | 51 | - [Quick Sort](#quick-sort)
|
52 | 52 | - [Mathematics & Stats You should know](#mathematics--stats-you-should-know)
|
| 53 | + - [How to initialize array of size n?](#how-to-initialize-array-of-size-n) |
53 | 54 | - [How many zeros in 1 Billion](#how-many-zeros-in-1-billion)
|
54 | 55 | - [How many zeros in 1 Million](#how-many-zeros-in-1-million)
|
55 | 56 | - [Integer Division Without Using \* or /](#integer-division-without-using--or-)
|
|
104 | 105 | - [Linked List](#linked-list-1)
|
105 | 106 | - [Reverse linked list](#reverse-linked-list)
|
106 | 107 | - [Find the merge point of 2 Linked List](#find-the-merge-point-of-2-linked-list)
|
| 108 | +- [How to Learn Binary Search Tree from zero to Hero?](#how-to-learn-binary-search-tree-from-zero-to-hero) |
107 | 109 | - [References](#references)
|
108 | 110 |
|
109 | 111 | > Coding interview question answers in JavaScript for Facebook, Amazon, Google, Microsoft or any company.
|
@@ -635,6 +637,17 @@ When Browser's are not using Merge sort they most of the time use Quick sort var
|
635 | 637 |
|
636 | 638 | ## Mathematics & Stats You should know
|
637 | 639 |
|
| 640 | +### How to initialize array of size n? |
| 641 | + |
| 642 | +Example create an array containing numbers from 0 to 9. |
| 643 | +`[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` |
| 644 | + |
| 645 | +```js |
| 646 | +var y = new Array.from(Array(10).keys()) |
| 647 | +``` |
| 648 | + |
| 649 | + |
| 650 | + |
638 | 651 | ### How many zeros in 1 Billion
|
639 | 652 |
|
640 | 653 | Answer: 9
|
@@ -1166,6 +1179,12 @@ Try `Binary Search`.
|
1166 | 1179 | on <a href="https://codepen.io">CodePen</a>.</span>
|
1167 | 1180 | </p>
|
1168 | 1181 |
|
| 1182 | +## How to Learn Binary Search Tree from zero to Hero? |
| 1183 | + |
| 1184 | +- Learn binary [search basics first](https://www.youtube.com/watch?v=GU7DpgHINWQ&list=PLl0KD3g-oDOHpWRyyGBUJ9jmul0lUOD80). |
| 1185 | +- Do all basic problems related to binary search [given in this link](https://codepen.io/collection/vBORpO). |
| 1186 | + |
| 1187 | + |
1169 | 1188 | ## References
|
1170 | 1189 |
|
1171 | 1190 | - http://btholt.github.io/four-semesters-of-cs/
|
|
0 commit comments