Supplementary Learning Resources
Curated external resources to help you strengthen your Data Structures & Algorithms skills beyond the classroom.
Disclaimer: The following external resources are curated to supplement classroom learning. The Department/College does not endorse the opinions or commercial activities of these creators, and these should not replace the primary curriculum and prescribed textbooks.
Recommended Resources
Master Your Logic Building
Phase-wise questions to build your programming fundamentals before starting DSA. · Source: CodeWithNishchal
- Print whether a number is positive, negative, or zero.
- Check if a number is even or odd.
- Check if a number is divisible by 5.
- Check if a number is divisible by both 3 and 5.
- Check if a given year is a leap year.
- Print the larger of two numbers.
- Print the largest of three numbers.
- Print "Cold", "Warm", or "Hot" based on temperature range.
- Check if a character is a vowel or consonant.
- Check if a character is uppercase, lowercase, digit, or special.
- Check if three sides form a valid triangle; determine its type.
- Print grade (A/B/C/D/F) for marks 0–100.
- Check if one of two numbers is a multiple of the other.
- Print "Good Morning / Afternoon / Evening / Night" for hour 0–23.
- Check voting eligibility (18+).
- Determine if two numbers are both even, both odd, or mixed.
- Check if a character lies between 'a'–'m' or 'n'–'z'.
- Print day name for day number 1–7.
- Print number of days in a month (1–12, ignore leap years).
- Check if all digits of a 3-digit number are distinct.
- Determine if the middle digit is largest, smallest, or neither.
- Check if first and last digits of a 4-digit number are equal.
- Check if a number is single-digit, double-digit, or multi-digit.
- Check if a number is a multiple of 7 or ends with 7.
- Determine which quadrant point (x, y) lies in.
- Check if an amount can be divided into 2000, 500, and 100 notes.
- Check if a number lies within [100, 999].
- Compute third angle given two angles of a triangle.
- Check if a number is a perfect square (without sqrt).
- Check if a character is a letter, digit, or neither.
- Print "Fizz", "Buzz", or "FizzBuzz" based on divisibility.
- Print the median of three numbers.
- Determine AM or PM from 24-hour time.
- Check tax eligibility (age > 18 and income > 5L).
- Check if both numbers are positive and their sum < 100.
- Print word form of a single digit (0–9).
- Determine if a weekday number is a weekday or weekend.
- Calculate electricity bill using slab-based if-else.
- Check if a password has length ≥ 8 and at least one digit.
- Check if point (x, y) is on X-axis, Y-axis, or origin.
- Check if three numbers form a Pythagorean triplet.
- Validate a calendar date (day and month, ignoring leap years).
- Print the smaller angle between hour and minute hands.
- Check if three numbers are in arithmetic progression.
- Check if three numbers are in geometric progression.
- Check if sum of first and last digit equals the middle digit (3-digit).
- Check if digit-sum > digit-product for an integer 1–9999.
- Determine which of two dates comes first.
- Print the century for a given year.
- Print numbers from 1 to 10.
- Print all even numbers between 1 and 100.
- Print all odd numbers between 1 and 100.
- Print numbers from 10 down to 1.
- Print the table of a given number.
- Print sum of first n natural numbers.
- Print sum of all even numbers up to n.
- Print sum of all odd numbers up to n.
- Print factorial of a given number.
- Print product of digits of a number.
- Count the number of digits in a given number.
- Print the reverse of a given number.
- Check if a number is a palindrome.
- Find the sum of digits of a number.
- Check if a number is an Armstrong number.
- Check if a number is a perfect number.
- Print all prime numbers between 1 and 100.
- Check if a number is prime.
- Print Fibonacci series up to n terms.
- Print sum of first n terms of Fibonacci series.
- Print squares of numbers from 1 to n.
- Print cubes of numbers from 1 to n.
- Print all numbers between a and b divisible by 7.
- Find HCF of two numbers using loops.
- Find LCM of two numbers using loops.
- Print all factors of a given number.
- Find the sum of all factors of a number.
- Check if a number is a strong number.
- Print first n terms of an arithmetic progression.
- Print first n terms of a geometric progression.
- Print all numbers (1–100) whose digit sum is even.
- Count numbers between 1–500 divisible by 7 but not 5.
- Print all palindromes between 1–500.
- Print numbers (1–100) whose digits add up to a multiple of 3.
- Find the smallest and largest digit in a number.
- Print numbers (1–n) whose binary has an even count of 1s.
- Print a pattern where each row i prints i×i.
- Print factorial of each number from 1 to n.
- Print sum of odd and even digits separately.
- Take 5 numbers; skip 0 using continue; print sum of non-zero.
- Print numbers from 1 to n using recursion.
- Print numbers from n down to 1 using recursion.
- Print only even numbers from 1 to n recursively.
- Print only odd numbers from 1 to n recursively.
- Print sum of first n natural numbers recursively.
- Print factorial of a number recursively.
- Calculate xⁿ using recursion.
- Find nth Fibonacci number recursively.
- Print Fibonacci series up to n terms recursively.
- Find sum of digits of a number recursively.
- Count digits in a number recursively.
- Reverse a number recursively.
- Check palindrome using recursion.
- Find product of digits recursively.
- Find GCD using Euclid's algorithm recursively.
- Convert a number to binary recursively.
- Print digits of a number in words recursively.
- Calculate sum of first n even numbers recursively.
- Calculate sum of first n odd numbers recursively.
- Find nCr using Pascal's relation recursively.
- Reverse a string using recursion.
- Check if a string is a palindrome using recursion.
- Count vowels in a string recursively.
- Remove all spaces from a string recursively.
- Replace all occurrences of 'a' with 'x' recursively.
- Remove all occurrences of a character recursively.
- Print all characters of a string one by one recursively.
- Print the string in reverse order recursively.
- Convert a string to uppercase recursively.
- Count consonants and vowels separately using recursion.
- Input n integers into an array and print them.
- Find the sum of all elements.
- Find the average of array elements.
- Find the maximum element.
- Find the minimum element.
- Count positive, negative, and zero elements.
- Count even and odd elements.
- Find the index of the maximum element.
- Find the index of the minimum element.
- Print elements greater than a given value k.
- Check if element x exists in the array.
- Count how many times a given element appears.
- Find the first occurrence of a number.
- Find the last occurrence of a number.
- Check if all elements are unique.
- Find sum of even elements only.
- Find sum of odd elements only.
- Count prime numbers in the array.
- Count numbers divisible by both 3 and 5.
- Count perfect squares in the array.
- Create array of squares of all numbers.
- Create array of only even elements.
- Replace every negative number with 0.
- Replace even numbers with 1 and odd with 0.
- Swap the first and last elements.
- Reverse an array without built-in reverse.
- Rotate left by one position.
- Rotate right by one position.
- Swap alternate elements (1st↔2nd, 3rd↔4th, ...).
- Copy one array to another manually.
- Check if the array is sorted ascending.
- Check if the array is sorted descending.
- Find the second largest element.
- Find the second smallest element.
- Find difference between largest and smallest.
- Find sum of all elements except largest and smallest.
- Count pairs whose sum equals k.
- Count elements greater than the array average.
- Print frequency of each distinct element.
- Print all unique elements (occurring exactly once).
- Take a string and print its length.
- Print the first and last character.
- Convert to uppercase.
- Convert to lowercase.
- Count characters excluding spaces.
- Count words in a sentence.
- Concatenate two strings.
- Compare two strings lexicographically.
- Print ASCII value of each character.
- Check whether the string is empty.
- Count vowels and consonants.
- Count digits, letters, and special characters.
- Count uppercase and lowercase letters.
- Find frequency of each character (no map).
- Count spaces in a sentence.
- Count occurrences of a given character.
- Count alphabets before and after 'm'.
- Count substrings that start and end with the same character.
- Count words starting with a vowel.
- Count words ending with 's'.
- Reverse a string without built-in reverse.
- Reverse each word in a sentence.
- Reverse the order of words.
- Check whether a string is a palindrome.
- Check if two strings are reverses of each other.
- Print the middle character(s).
- Print the second half in reverse.
- Remove first and last character.
- Reverse only characters, keeping digits in place.
- Reverse string but skip spaces.
- Remove all vowels.
- Remove all spaces.
- Replace vowels with '*'.
- Replace spaces with '_'.
- Remove all digits.
- Remove duplicate characters.
- Keep only the first occurrence of each character.
- Remove consecutive duplicates.
- Swap case (upper→lower, lower→upper).
- Shift each character by 1 ('abc'→'bcd').
- Print each word on a new line.
- Count words with even length.
- Find the longest word.
- Find the shortest word.
- Swap first and last words.
- Print words that start and end with the same letter.
- Count words containing 'a'.
- Capitalize the first letter of each word.
- Print the sentence in title case.
- Remove extra spaces between words.
- Print all numbers (1–N) divisible by both 3 and 5.
- Find sum of digits using a loop.
- Check if a number is an Armstrong number.
- Print all Armstrong numbers between 1 and 1000.
- Find factorial using recursion.
- Count even digits in a number.
- Print all primes between 1 and N.
- Reverse a number (123→321).
- Check if a number is a palindrome.
- Check if a number is perfect.
- Check if two strings are anagrams (no collections).
- Count vowels in each word of a sentence.
- Reverse words with even length.
- Replace vowels with their position (a=1, e=2...).
- Print characters appearing more than once (no map).
- Count words starting and ending with the same letter.
- Toggle case for every alternate word.
- Check if two strings are rotations of each other.
- Find the word with the maximum vowels.
- Remove duplicate words from a sentence.
- Find max and min element.
- Count positive, negative, and zero elements.
- Print all unique elements.
- Reverse an array in-place.
- Shift all zeros to the end.
- Count elements that are even at an even index.
- Merge two arrays into one.
- Find the second largest element.
- Rotate an array right by one.
- Find sum of elements at odd indices.
- Given student marks, count how many passed (≥ 40).
- Count adults, minors, and seniors from age inputs.
- Validate a password (uppercase, lowercase, digit, special char).
- Simulate a simple calculator using switch-case.
- Print frequency of each digit in a number.
- Find common elements between two arrays.
- Print characters common to two strings.
- Count prime numbers in an array.
- Print all palindromic words from a sentence.
450 DSA Questions
Topic-wise curated list of must-solve DSA problems for placements and interviews, compiled by Love Babbar. Download the sheet and track your progress offline.
14 topics · 450 curated problems · Excel format (.xlsx)
Source: Love Babbar · Covers Arrays, Strings, DP, Graphs, Trees & more