|
55 | 55 | - [Array slice](#array-slice)
|
56 | 56 | - [Math.floor](#mathfloor)
|
57 | 57 | - [Math.round](#mathround)
|
| 58 | + - [JavaScript Integer Max Min](#javascript-integer-max-min) |
58 | 59 | - [Mock Interview](#mock-interview)
|
59 | 60 | - [Get the Average value at each level of the tree](#get-the-average-value-at-each-level-of-the-tree)
|
60 | 61 | - [ADT](#adt)
|
|
76 | 77 | - [Reverse linked list](#reverse-linked-list)
|
77 | 78 | - [References](#references)
|
78 | 79 |
|
| 80 | +> Coding interview question answers in JavaScript for Facebook, Amazon, Google, Microsoft or any company. |
| 81 | +
|
79 | 82 | ## Important thing to remember
|
80 | 83 |
|
81 | 84 | - Remember: Run through `your code` not through the `algorithm` while executing test.
|
@@ -415,6 +418,14 @@ Binary Search can be done both in iterative or recursive way.
|
415 | 418 |
|
416 | 419 | 
|
417 | 420 |
|
| 421 | +Binary Search tree has left sub tree which is `less than or equal` to root. And right subtree which is `strictly greater` than the root. |
| 422 | + |
| 423 | + |
| 424 | + |
| 425 | +Below image is not a BST |
| 426 | + |
| 427 | + |
| 428 | + |
418 | 429 | #### Binary Search Iterative
|
419 | 430 |
|
420 | 431 | 
|
@@ -606,6 +617,13 @@ Math.round(2.8) = 3
|
606 | 617 | Math.round(2.4) = 2
|
607 | 618 | ```
|
608 | 619 |
|
| 620 | +### JavaScript Integer Max Min |
| 621 | + |
| 622 | +It is 16 digit number. |
| 623 | + |
| 624 | +- `MIN_SAFE_INTEGER` = -9007199254740992 |
| 625 | +- `MAX_SAFE_INTEGER` = 9007199254740991 |
| 626 | + |
609 | 627 | ## Mock Interview
|
610 | 628 |
|
611 | 629 | ### Get the Average value at each level of the tree
|
@@ -656,6 +674,21 @@ Trade off or invest some memory to improve run time complexity. Suppose use Has-
|
656 | 674 |
|
657 | 675 | **Binary Search Tree (BST)**: is a binary tree in which for each node value of all the nodes in the left subtree is lesser or equal to the root node. And the values of all the nodes in the right subtree is greater than the root node.
|
658 | 676 |
|
| 677 | +In order to find a tree as BST we must define each node range that is its outer and inner bound values. |
| 678 | + |
| 679 | + |
| 680 | + |
| 681 | +Is Binary Search Tree Algorithm |
| 682 | + |
| 683 | + |
| 684 | + |
| 685 | +Is Binary Search Tree Algorithm Simulation |
| 686 | + |
| 687 | + |
| 688 | + |
| 689 | +- [Question](https://codepen.io/roopkt/pen/JjWwYGo) |
| 690 | +- [Answer](https://codepen.io/roopkt/pen/zYZyvzO) |
| 691 | + |
659 | 692 | ### Recursion Interview Questions
|
660 | 693 |
|
661 | 694 | #### Calculate x to the power n using recursion
|
|
0 commit comments