Skip to content

Data structures#49

Open
wneshad wants to merge 25 commits intoinfinixaco:masterfrom
wneshad:DATA-STRUCTURES
Open

Data structures#49
wneshad wants to merge 25 commits intoinfinixaco:masterfrom
wneshad:DATA-STRUCTURES

Conversation

@wneshad
Copy link
Contributor

@wneshad wneshad commented Oct 12, 2021

No description provided.

Raj and others added 25 commits October 1, 2020 20:05
A JavaScript class to help solve problems related to stack like the Parenthesis problem
Implementation of merge sort in python
 A priority queue is an abstract data type in which each element additionally has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority
priority Queue implementation in c language.
This code implements various operations of Binary Search Tree.
Binary search tree implementation in c language.
The problem here is simpler as we don’t need to create a circular DLL, but a simple DLL. The idea behind its solution is quite simple and straight.

If the left subtree exists, process the left subtree
Recursively convert the left subtree to DLL.
Then find the inorder predecessor of the root in the left subtree (the inorder predecessor is the rightmost node in the left subtree).
Make the inorder predecessor as the previous root and the root as the next in order predecessor.
 If the right subtree exists, process the right subtree (Below 3 steps are similar to the left subtree).
Recursively convert the right subtree to DLL.
Then find the inorder successor of the root in the right subtree (in order the successor is the leftmost node in the right subtree).
Make the inorder successor the next root and the root the previous inorder successor.
Find the leftmost node and return it (the leftmost node is always the head of a converted DLL).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants