/ds-algo-solutions

A collection of solutions for Hackerrank data structures and algorithm problems in Python

Primary LanguageJavaMIT LicenseMIT

Join the chat at https://gitter.im/ds-algo-solutions/community

ds-algo-solutions

A collection of solutions for HackerRank data structures and algorithm problems in Python, JAVA, and CPP. This community-owned project aims to bring together the solutions for the DS & Algo problems across various platforms, along with the resources for learning them. Problems from Leetcode will be included soon in the project.

Contribution Instructions

Please add your code with proper comments. Add the code into the exact folder category with the name solution.<extension> . For example, solution.py Please add the link to the README as well. The folder structure Arrays/Left Rotation/solution.java should look like Arrays/Left%20Rotation/solution.java.

HackerRank

HackerRank is a place where programmers from all over the world come together to solve problems in a wide range of Computer Science domains such as algorithms, machine learning, or artificial intelligence, as well as to practice different programming paradigms like functional programming.

Topic Question Difficulty CPP JAVA Python
Arrays
2D Array Easy View View View
Dynamic Array Easy View View View
Left Rotation Easy [View]/Arrays/Left%20Rotation/solution.cpp) View
Sparse Arrays Medium View
Array Manipulation Hard View
Linked Lists
Print the Elements of a Linked List Easy View View View
Insert a node at the head of a linked list Easy View View View
Insert a Node at the Tail of a Linked List Easy View View View
Insert a node at a specific position in a linked list Easy View View View
Delete a Node Easy View View View
Print in Reverse Easy View View View
Compare two linked lists Easy View View View
Merge two sorted linked lists Easy View View View
Get Node Value Easy View View View
Reverse a linked list Easy View View View
Delete duplicate-value nodes from a sorted linked list Easy View View View
Find Merge Point of Two Lists Easy View View View
Cycle Detection Easy View View
Inserting a Node Into a Sorted Doubly Linked List Easy View View
Reverse a doubly linked list Easy View View
Stacks
Maximum Element Medium View
Balanced Brackets Medium View View
Equal Stacks Medium View
Largest Rectangle Medium View
Simple Text Editor Medium View
Waiter Medium View
Queues
Queue using Two Stacks Medium View
Castle on the Grid Medium View
Down to Zero II Medium View
Heaps
Jesse and Cookies Easy View View
Trees
Tree : Top View Easy View
Tree: Preorder Traversal Easy View View View
Tree: Inorder Traversal Easy View View View
Tree: Postorder Traversal Easy View View View
Tree: Level Order Traversal Easy View View
Tree: Height of a Binary Tree Easy View View View
Binary Search Tree : Insertion Easy View View
Binary Search Tree : Lowest Common Ancestor Easy View
Is This a Binary Search Tree? Medium View
Swap Nodes [Algo] Medium View
Tree: Huffman Decoding Medium View
Algorithms
Grading Students Easy View View
Apple and Orange Easy View
Number Line Jumps Easy View
Encryption Medium View
Breaking the Records Easy View View
Sales by Match Easy View View
Climbing the Leaderboard Medium View
Diagonal Difference Easy View View View
Minimum Absolute Difference in an Array Medium View
Contest Problems
Squares of a Sorted Array Medium View View

A cool & collective resourcešŸ”»

https://drive.google.com/file/d/1FMdN_OCfOI0iAeDlqswCiC2DZzD4nPsb/view?usp=sharing

Contribution Guidelines

Go to the HackerRank problem-solving section (https://www.hackerrank.com/domains/data-structures), solve a problem such that it passes all test cases, make a Pull Request with the solution in the respective folder. Feel free to suggest any useful resources for studying ds & algo.e

Also, please explain your code with comments.