-
Updated
Mar 25, 2020
interview-prep
Here are 120 public repositories matching this topic...
-
Updated
Mar 26, 2020 - Java
-
Updated
Mar 21, 2020
-
Updated
Nov 19, 2019 - Java
-
Updated
Dec 16, 2019 - Python
-
Updated
Jan 7, 2020
-
Updated
Nov 27, 2019
-
Updated
Mar 21, 2020 - JavaScript
-
Updated
Mar 26, 2020 - JavaScript
We are not handling the both left and right pointers when we delete the node. Update will be as mentioned below
// node only has right child
else if (!node.left) {
node.value = node.right.value
node.right = node.right.right
node.left = node.right.left;
}
// node only has left child
else if (!node.right
-
Updated
Mar 24, 2020 - C++
-
Updated
Jan 31, 2020 - Python
-
Updated
Mar 27, 2020 - JavaScript
-
Updated
Jan 14, 2020 - Python
-
Updated
Oct 25, 2019
-
Updated
Mar 11, 2018
-
Updated
Nov 5, 2018 - JavaScript
-
Updated
Jul 1, 2019
-
Updated
Sep 18, 2018 - Java
-
Updated
Nov 14, 2019 - Java
-
Updated
Sep 15, 2018 - C++
-
Updated
Nov 1, 2019 - JavaScript
-
Updated
Dec 20, 2019 - C
Add more questions
Hello everyone,
You can contribute to this repo by adding questions that an interviewee can ask, which can help him decide and understand a company better.
All PR are accepted.
-
Updated
Feb 27, 2018
-
Updated
Aug 20, 2017 - Java
Improve this page
Add a description, image, and links to the interview-prep topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the interview-prep topic, visit your repo's landing page and select "manage topics."
The heap.png image in the readme (https://raw.githubusercontent.com/kdn251/interviews/master/images/heap.png) shows a tree that does indeed respect the heap order property. The problem is when you mention the time complexities. In order to have O(log(n)) insert / remove time you also need for your heap to be a complete binary tree. The heap in the picture is not a complete binary tree. I think it