Skip to content

Collection of python solution for the 450 problems that was created by Love Babbar

Notifications You must be signed in to change notification settings

blackviking27/DSA-450-Python

Repository files navigation

DSA 450

This repo is collection of solutions for the 450 dsa question published by Love babbar. All the solutions are written in python progrmming language.

I am using this to keep track of the problems since it allows you to mark problems without actually logging in as it is using the localdb.

Search and Sort

S.no Problem Solution
1 Find first and last positions of an element in a sorted array Link
2 Find a Fixed Point (Value equal to index) in a given array Link
3 Search in a rotated sorted array Link
4 Square root of an integer Link
5 Maximum and minimum of an array using minimum number of comparisons Link
6 Find the repeating and the missing Link
7 find majority element Link
8 Searching in an array where adjacent differ by at most k Link
9 find a pair with a given difference Link
10 find four elements that sum to a given value Link
11 maximum sum such that no 2 elements are adjacent Link
12 Count triplet with sum smaller than a given value Link
13 merge 2 sorted arrays Link
14 print all subarrays with 0 sum Link
15 Product array Puzzle Link
16 Sort array according to count of set bits Link
17 minimum no. of swaps required to sort the array Link
18 Bishu and Soldiers Link
19 Kth smallest number again Link
20 Aggressive cows Link
21 Book Allocation Problem Link
22 EKOSPOJ: Link
23 Job Scheduling Algo Link
24 Missing Number in AP Link
25 Smallest number with atleastn trailing zeroes infactorial Link
26 ROTI-Prata SPOJ Link
27 DoubleHelix SPOJ Link
28 Subset Sums Link
29 Findthe inversion count Link
30 Implement Merge-sort in-place Link

Linked List

S.no Problem Solution
1 Write a Program to reverse the Linked List. (Both Iterative and recursive) Link
2 Reverse a Linked List in group of Given Size. [Very Imp] Link
3 Write a program to Detect loop in a linked list. Link
4 Write a program to Delete loop in a linked list. Link
5 Find the starting point of the loop. Link
6 Remove Duplicates in a sorted Linked List. Link
7 Remove Duplicates in a Un-sorted Linked List Link
8 Write a Program to Move the last element to Front in a Linked List. Link
9 Add “1” to a number represented as a Linked List. Link
10 Add two numbers represented by linked lists. Link
11 Intersection of two Sorted Linked List. Link
12 Intersection Point of two Linked Lists. Link
13 Merge Sort For Linked lists.[Very Important] Link
14 Find the middle Element of a linked list. Link
15 Check if a linked list is a circular linked list. Link
16 Split a Circular linked list into two halves. Link
17 Write a Program to check whether the Singly Linked list is a palindrome or not. Link
18 Deletion from a Circular Linked List. Link
19 Reverse a Doubly Linked list. Link
20 Find pairs with a given sum in a DLL. Link
21 Count triplets in a sorted DLL whose sum is equal to given value “X”. Link
22 Sort a “k”sorted Doubly Linked list.[Very IMP] Link
23 Rotate DoublyLinked list by N nodes. Link
24 Rotate a Doubly Linked list in group of Given Size.[Very IMP] Link
25 Flatten a Linked List Link
26 Sort a LL of 0's, 1's and 2's Link
27 Clone a linked list with next and random pointer Link
28 Merge K sorted Linked list Link
29 Multiply 2 no. represented by LL Link
30 Delete nodes which have a greater value on right side Link
31 Segregate even and odd nodes in a Linked List Link
32 Program for n’th node from the end of a Linked List Link

About

Collection of python solution for the 450 problems that was created by Love Babbar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages