DSA Practice Checklist
Diamond pattern -> Try to solve few pattern questions
Given an array of numbers. Print the numbers without duplication.
Sort the array odd numbers in ascending and even numbers in descending.
https://www.geeksforgeeks.org/find-number-currency-notes-sum-upto-given-amount/
https://www.geeksforgeeks.org/program-to-convert-hexadecimal-number-to-binary/
https://www.geeksforgeeks.org/convert-binary-number-hexadecimal-number/
Sort the array elements in descending order according to their frequency of occurrence
Print true if second string is a substring of first string, else print false.
Find the least prime number that can be added with first array element that makes them
divisible by second array elements at respective index
Prime number – print n prime numbers
Prime factor – sort the array based on the minimum factor they have
TWISTED PRIME NUMBER
Find the prime number in the given range. (test cases: interval is negative in range)
Find the extra element and its index
Move Zeroes to End of Array
Find Element Appears Once
https://leetcode.com/problems/single-number-ii/description/
Transform String
Missing Number
STRING MANIPULATIONS
MATRIX SORTING
https://www.geeksforgeeks.org/problems/count-possible-triangles-1587115620/1?
itm_source=geeksforgeeks&itm_medium=article&itm_campaign=bottom_sticky_on_article
Sort the given elements in decending order based on the number of factors of each element
Find whether the given number is palindrome or not. Don’t use arrays or strings
Reverse the given string keeping the position of special characters intact
Decode a string recursively encoded as count followed by substring.
Given an array of integers of size n. Convert the array in such a way that if next valid
number is same as current number, double its value and replace the next number with 0.
Given an array A[] and a number x, check for pair in A[] with sum as x.
Kadane’ Algorithm
Given an input string and a dictionary of words, find out if the input string can be
segmented into a space-separated sequence of dictionary words
Given two Strings s1 and s2, remove all the characters from s1 which is present in s2.
Find the next greater element for each element in given array.
Given a number, find the next smallest palindrome.
Given an array with repeated numbers, Find the top three repeated numbers
Given two dates, find total number of days between them.
Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of
possible decodings of the given digit sequence.
Print all possible words from phone digits
Given two dimensional matrix of integer and print the rectangle can be formed using given
indices and also find the sum of the elements in the rectangle
Given two dates, find total number of days between them.
Let 1 represent ‘A’, 2 represents ‘B’, etc. Given a digit sequence, count the number of
possible decodings of the given digit sequence.
array of numbers were given to find a number which has same sum of numbers in it’s
either side.
Adding a digit to all the digits of a number eg digit=4, number = 2875, o/p= 612119
https://leetcode.com/problems/add-digits/description/
Form the largest possible number using the array of numbers.
Lexicographic sorting.
Given a set of numbers and a digit in each iteration, if the digit exists in any of the numbers,
remove its occurrences and ask for the next digit till the list becomes empty.
Check if a number ‘a’ is present in another number ‘b.
https://leetcode.com/problems/maximum-product-of-three-numbers/description/
Numbers whose sum is closest to zero in an array
Find palindrome word in sentences.
Pangram Checking
Given two strings, find the first occurrence of all characters of second string in the first
string and print the characters between the least and the highest index
Matrix Diagonal sum
Matrix Addition
Given a timeline of scores, find the individual scores of player 1 and player 2 and Extras
W – Wide N – No Ball . – Dot Ball
Given a range of numbers print the numbers such that they are shuffled
Insert 0 after consecutive (K times) of 1 is found
To calculate strength of the password string using some predefined rules given in the
question
Given four points, We have to say whether it is square or rectangle or any other shape
Given a large number convert it to the base 7.
Sort parts of an array separately using peak values.
Given an input array, find the number of occurrences of a particular number without
looping (use hashing)
Given an array of characters print the characters that have ‘n’ number of occurrences. If a
character appears consecutively it is counted as 1 occurrence
Find the second maximum among the given numbers.
Given a two dimensional array which consists of only 0’s and 1’s. Print the matrix without
duplication.
Given an array of positive numbers. Print the numbers which have longest continuous
range.
Given two arrays. Find its union.
Climbing Stairs
Group Anagrams
Given an array of numbers and a number k. Print the maximum possible k digit number
which can be formed using given numbers.
Given an array of numbers and a window of size k. Print the maximum of numbers inside
the window for each step as the window moves from the beginning of the array.
Search a string in a given 2D matrix.
Find the number of rectangles filled with 1s in a matrix
Given a string, reverse only vowels in it;
Write a program to check if the given words are present in matrix given below.
Given 2 huge numbers as separate digits, store them in array and process them and
calculate the sum of 2 numbers and store the result in an array and print the sum.
Given sorted array check if two numbers sum in it is a given
Given array find maximum sum of contiguous sub array
Given unsorted array find all combination of the element for a given sum.
Given an odd length word which should be printed from the middle of the word.
Given an IP address validate it based on the given conditions.
LRU Cache
Given an array of positive integers. The output should be the number of occurrences of each
number.
Given an array, find the minimum of all the greater numbers for each element in the array.
Given a N*N binary matrix and the co-ordinate points of start and destination, find the
number of possible path between them.
Find the largest sum contiguous subarray which should not have negative numbers
Given a string, we have to reverse the string without changing the position of punctuations
and spaces.
Given a 2D grid of characters, you have to search for all the words in a dictionary by moving
only along two directions, either right or down. Print the word if it occurs.
Given a string, change the order of words in the string (last string should come first).
Find the shortest path from one element to another element in a matrix using right and
down moves alone.
Write a program to rotate an n*n matrix 90,180,270,360 degree.
Print longest sequence between same character
Check whether a string is a subsequence of another or not.
https://leetcode.com/problems/decode-ways/
https://leetcode.com/problems/most-common-word/
https://leetcode.com/problems/longest-increasing-subsequence/
Wildcard Pattern Matching
There are n items each with a value and weight. A sack is filled with the weights. In other
words there is an array with of length n having the values of the items arr[0…n-1] and
another array with weight arr[0…n-1].
https://www.geeksforgeeks.org/number-cells-queen-can-move-obstacles-chessborad
https://www.geeksforgeeks.org/word-ladder-length-of-shortest-chain-to-reach-a-target-
word
https://www.geeksforgeeks.org/distinct-permutations-string-set-2
https://www.geeksforgeeks.org/job-sequencing-problem-set-1-greedy-algorithm/
https://leetcode.com/problems/string-transformation/description/
https://www.geeksforgeeks.org/number-cells-queen-can-move-obstacles-chessborad/