Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTree Implement & Pre,In,Post order Traversal #4

Closed

Conversation

shivamgupta08
Copy link

BTree Implement & Pre,In,Post order Traversal

higorsnt and others added 30 commits October 1, 2019 20:32
Like arrays, Linked List is a linear data structure. Unlike arrays, linked list elements are not stored at a contiguous location; the elements are linked using pointers.
Its Advantages over arrays
1) Dynamic size
2) Ease of insertion/deletion
Sorting algorithms package and mergesort added
Here is an implementation in python of a simple arithmetic evaluator that evaluates expressions in reverse polish notation.
Given a graph and a source vertex src in graph, find shortest paths from src to all vertices in the given graph. The graph may contain negative weight edges.
We have discussed Dijkstra’s algorithm for this problem. Dijkstra’s algorithm is a Greedy algorithm and time complexity is O(VLogV) (with the use of Fibonacci heap). Dijkstra doesn’t work for Graphs with negative weight edges, Bellman-Ford works for such graphs. Bellman-Ford is also simpler than Dijkstra and suites well for distributed systems. But time complexity of Bellman-Ford is O(VE), which is more than Dijkstra.
Linked list implementation in python
Added Bellman Ford Algo using Dp
Added Kadane’s Algorithm for Largest Sum Contiguous Subarray in c++
A succinct encoding of Binary Tree takes close to minimum possible space. The number of structurally different binary trees on n nodes is n’th Catalan number. For large n, this is about 4n; thus we need at least about log2 4 n = 2n bits to encode it. A succinct binary tree therefore would occupy 2n+o(n) bits.

One simple representation which meets this bound is to visit the nodes of the tree in preorder, outputting “1” for an internal node and “0” for a leaf. If the tree contains data, we can simply simultaneously store it in a consecutive array in preorder.
Added decode ways of a string code in java
Added Merge Sort and Quick Sort Algo in java
Boruvka's Algorithm implemented using python
Added java code to print inorder traversal of a BST
noemi3 and others added 26 commits October 7, 2019 11:43
added queue implemented with resizing array in kotlin
added stack implemented with resizing array in kotlin
Add new data structure - skip list python
Added coinChange solution in java
added travelling salesman problem in c++
Added MergeSort CPP
Added MergeSort CPP
Stack Implementation using Vector in C++
BTree implement and PRE,IN,POST order traversals.
Copy link
Owner

@vanshikaarora vanshikaarora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please send a PR having only the necessary changes.
Thanks

mayank5464942 referenced this pull request in mayank5464942/DS_Algo Oct 29, 2019
vanshikaarora pushed a commit that referenced this pull request Nov 5, 2019
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.