Skip to content

Commit 1485398

Browse files
committed
chore: fixes
1 parent 143b608 commit 1485398

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
- [Array slice](#array-slice)
5656
- [Math.floor](#mathfloor)
5757
- [Math.round](#mathround)
58+
- [JavaScript Integer Max Min](#javascript-integer-max-min)
5859
- [Mock Interview](#mock-interview)
5960
- [Get the Average value at each level of the tree](#get-the-average-value-at-each-level-of-the-tree)
6061
- [ADT](#adt)
@@ -76,6 +77,8 @@
7677
- [Reverse linked list](#reverse-linked-list)
7778
- [References](#references)
7879

80+
> Coding interview question answers in JavaScript for Facebook, Amazon, Google, Microsoft or any company.
81+
7982
## Important thing to remember
8083

8184
- 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.
415418

416419
![](https://i.imgur.com/PWjbCaZ.png)
417420

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+
![](https://i.imgur.com/PUaVUjq.png)
424+
425+
Below image is not a BST
426+
427+
![](https://i.imgur.com/im9F6cb.png)
428+
418429
#### Binary Search Iterative
419430

420431
![](https://i.imgur.com/CQSDjqZ.png)
@@ -606,6 +617,13 @@ Math.round(2.8) = 3
606617
Math.round(2.4) = 2
607618
```
608619

620+
### JavaScript Integer Max Min
621+
622+
It is 16 digit number.
623+
624+
- `MIN_SAFE_INTEGER` = -9007199254740992
625+
- `MAX_SAFE_INTEGER` = 9007199254740991
626+
609627
## Mock Interview
610628

611629
### 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-
656674

657675
**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.
658676

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+
![](https://i.imgur.com/gxHDDqd.png)
680+
681+
Is Binary Search Tree Algorithm
682+
683+
![](https://i.imgur.com/zaxKJxL.png)
684+
685+
Is Binary Search Tree Algorithm Simulation
686+
687+
![](https://i.imgur.com/il4sN6p.png)
688+
689+
- [Question](https://codepen.io/roopkt/pen/JjWwYGo)
690+
- [Answer](https://codepen.io/roopkt/pen/zYZyvzO)
691+
659692
### Recursion Interview Questions
660693

661694
#### Calculate x to the power n using recursion

0 commit comments

Comments
 (0)