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.

← Back to Student Corner

Recommended Resources

Master Your Logic Building

Phase-wise questions to build your programming fundamentals before starting DSA. · Source: CodeWithNishchal

Phase 1
Conditional Thinking
If–Else, Boolean Logic · 50 Questions
Level 1 — Simple Conditions
  1. Print whether a number is positive, negative, or zero.
  2. Check if a number is even or odd.
  3. Check if a number is divisible by 5.
  4. Check if a number is divisible by both 3 and 5.
  5. Check if a given year is a leap year.
  6. Print the larger of two numbers.
  7. Print the largest of three numbers.
  8. Print "Cold", "Warm", or "Hot" based on temperature range.
  9. Check if a character is a vowel or consonant.
  10. Check if a character is uppercase, lowercase, digit, or special.
Level 2 — Nested If & Multiple Conditions
  1. Check if three sides form a valid triangle; determine its type.
  2. Print grade (A/B/C/D/F) for marks 0–100.
  3. Check if one of two numbers is a multiple of the other.
  4. Print "Good Morning / Afternoon / Evening / Night" for hour 0–23.
  5. Check voting eligibility (18+).
  6. Determine if two numbers are both even, both odd, or mixed.
  7. Check if a character lies between 'a'–'m' or 'n'–'z'.
  8. Print day name for day number 1–7.
  9. Print number of days in a month (1–12, ignore leap years).
Level 3 — Math and Number Logic
  1. Check if all digits of a 3-digit number are distinct.
  2. Determine if the middle digit is largest, smallest, or neither.
  3. Check if first and last digits of a 4-digit number are equal.
  4. Check if a number is single-digit, double-digit, or multi-digit.
  5. Check if a number is a multiple of 7 or ends with 7.
  6. Determine which quadrant point (x, y) lies in.
  7. Check if an amount can be divided into 2000, 500, and 100 notes.
  8. Check if a number lies within [100, 999].
  9. Compute third angle given two angles of a triangle.
  10. Check if a number is a perfect square (without sqrt).
Level 4 — Logical Operators & Compound Statements
  1. Check if a character is a letter, digit, or neither.
  2. Print "Fizz", "Buzz", or "FizzBuzz" based on divisibility.
  3. Print the median of three numbers.
  4. Determine AM or PM from 24-hour time.
  5. Check tax eligibility (age > 18 and income > 5L).
  6. Check if both numbers are positive and their sum < 100.
  7. Print word form of a single digit (0–9).
  8. Determine if a weekday number is a weekday or weekend.
  9. Calculate electricity bill using slab-based if-else.
  10. Check if a password has length ≥ 8 and at least one digit.
Level 5 — Creative / Tricky Scenarios
  1. Check if point (x, y) is on X-axis, Y-axis, or origin.
  2. Check if three numbers form a Pythagorean triplet.
  3. Validate a calendar date (day and month, ignoring leap years).
  4. Print the smaller angle between hour and minute hands.
  5. Check if three numbers are in arithmetic progression.
  6. Check if three numbers are in geometric progression.
  7. Check if sum of first and last digit equals the middle digit (3-digit).
  8. Check if digit-sum > digit-product for an integer 1–9999.
  9. Determine which of two dates comes first.
  10. Print the century for a given year.
Phase 2
Looping & Patterns
Iteration & Flow · 40–50 Questions
Level 1 — Basic Looping
  1. Print numbers from 1 to 10.
  2. Print all even numbers between 1 and 100.
  3. Print all odd numbers between 1 and 100.
  4. Print numbers from 10 down to 1.
  5. Print the table of a given number.
  6. Print sum of first n natural numbers.
  7. Print sum of all even numbers up to n.
  8. Print sum of all odd numbers up to n.
  9. Print factorial of a given number.
  10. Print product of digits of a number.
Level 2 — Number-based Looping Logic
  1. Count the number of digits in a given number.
  2. Print the reverse of a given number.
  3. Check if a number is a palindrome.
  4. Find the sum of digits of a number.
  5. Check if a number is an Armstrong number.
  6. Check if a number is a perfect number.
  7. Print all prime numbers between 1 and 100.
  8. Check if a number is prime.
  9. Print Fibonacci series up to n terms.
  10. Print sum of first n terms of Fibonacci series.
Level 3 — Mathematical & Logical Patterns
  1. Print squares of numbers from 1 to n.
  2. Print cubes of numbers from 1 to n.
  3. Print all numbers between a and b divisible by 7.
  4. Find HCF of two numbers using loops.
  5. Find LCM of two numbers using loops.
  6. Print all factors of a given number.
  7. Find the sum of all factors of a number.
  8. Check if a number is a strong number.
  9. Print first n terms of an arithmetic progression.
  10. Print first n terms of a geometric progression.
Level 5 — Logical Loop Combinations
  1. Print all numbers (1–100) whose digit sum is even.
  2. Count numbers between 1–500 divisible by 7 but not 5.
  3. Print all palindromes between 1–500.
  4. Print numbers (1–100) whose digits add up to a multiple of 3.
  5. Find the smallest and largest digit in a number.
  6. Print numbers (1–n) whose binary has an even count of 1s.
  7. Print a pattern where each row i prints i×i.
  8. Print factorial of each number from 1 to n.
  9. Print sum of odd and even digits separately.
  10. Take 5 numbers; skip 0 using continue; print sum of non-zero.
Phase 3
Recursion
Thinking in Self-Reference · 30–40 Questions
Level 1 — Foundation of Recursion
  1. Print numbers from 1 to n using recursion.
  2. Print numbers from n down to 1 using recursion.
  3. Print only even numbers from 1 to n recursively.
  4. Print only odd numbers from 1 to n recursively.
  5. Print sum of first n natural numbers recursively.
  6. Print factorial of a number recursively.
  7. Calculate xⁿ using recursion.
  8. Find nth Fibonacci number recursively.
  9. Print Fibonacci series up to n terms recursively.
  10. Find sum of digits of a number recursively.
Level 2 — Number-based Recursive Thinking
  1. Count digits in a number recursively.
  2. Reverse a number recursively.
  3. Check palindrome using recursion.
  4. Find product of digits recursively.
  5. Find GCD using Euclid's algorithm recursively.
  6. Convert a number to binary recursively.
  7. Print digits of a number in words recursively.
  8. Calculate sum of first n even numbers recursively.
  9. Calculate sum of first n odd numbers recursively.
  10. Find nCr using Pascal's relation recursively.
Level 4 — String-based Recursion
  1. Reverse a string using recursion.
  2. Check if a string is a palindrome using recursion.
  3. Count vowels in a string recursively.
  4. Remove all spaces from a string recursively.
  5. Replace all occurrences of 'a' with 'x' recursively.
  6. Remove all occurrences of a character recursively.
  7. Print all characters of a string one by one recursively.
  8. Print the string in reverse order recursively.
  9. Convert a string to uppercase recursively.
  10. Count consonants and vowels separately using recursion.
Phase 4
Basic Arrays
Iterative Logical Thinking · 30–40 Questions
Level 1 — Fundamentals
  1. Input n integers into an array and print them.
  2. Find the sum of all elements.
  3. Find the average of array elements.
  4. Find the maximum element.
  5. Find the minimum element.
  6. Count positive, negative, and zero elements.
  7. Count even and odd elements.
  8. Find the index of the maximum element.
  9. Find the index of the minimum element.
  10. Print elements greater than a given value k.
Level 2 — Searching & Counting
  1. Check if element x exists in the array.
  2. Count how many times a given element appears.
  3. Find the first occurrence of a number.
  4. Find the last occurrence of a number.
  5. Check if all elements are unique.
  6. Find sum of even elements only.
  7. Find sum of odd elements only.
  8. Count prime numbers in the array.
  9. Count numbers divisible by both 3 and 5.
  10. Count perfect squares in the array.
Level 3 — Transformation
  1. Create array of squares of all numbers.
  2. Create array of only even elements.
  3. Replace every negative number with 0.
  4. Replace even numbers with 1 and odd with 0.
  5. Swap the first and last elements.
  6. Reverse an array without built-in reverse.
  7. Rotate left by one position.
  8. Rotate right by one position.
  9. Swap alternate elements (1st↔2nd, 3rd↔4th, ...).
  10. Copy one array to another manually.
Level 5 — Applied Array Problems
  1. Check if the array is sorted ascending.
  2. Check if the array is sorted descending.
  3. Find the second largest element.
  4. Find the second smallest element.
  5. Find difference between largest and smallest.
  6. Find sum of all elements except largest and smallest.
  7. Count pairs whose sum equals k.
  8. Count elements greater than the array average.
  9. Print frequency of each distinct element.
  10. Print all unique elements (occurring exactly once).
Phase 5
Strings
Basic Logic Building · 50 Questions
Category 1 — Basic String Handling
  1. Take a string and print its length.
  2. Print the first and last character.
  3. Convert to uppercase.
  4. Convert to lowercase.
  5. Count characters excluding spaces.
  6. Count words in a sentence.
  7. Concatenate two strings.
  8. Compare two strings lexicographically.
  9. Print ASCII value of each character.
  10. Check whether the string is empty.
Category 2 — Counting & Character Analysis
  1. Count vowels and consonants.
  2. Count digits, letters, and special characters.
  3. Count uppercase and lowercase letters.
  4. Find frequency of each character (no map).
  5. Count spaces in a sentence.
  6. Count occurrences of a given character.
  7. Count alphabets before and after 'm'.
  8. Count substrings that start and end with the same character.
  9. Count words starting with a vowel.
  10. Count words ending with 's'.
Category 3 — Reversing & Palindromic Thinking
  1. Reverse a string without built-in reverse.
  2. Reverse each word in a sentence.
  3. Reverse the order of words.
  4. Check whether a string is a palindrome.
  5. Check if two strings are reverses of each other.
  6. Print the middle character(s).
  7. Print the second half in reverse.
  8. Remove first and last character.
  9. Reverse only characters, keeping digits in place.
  10. Reverse string but skip spaces.
Category 4 — Character & Word Manipulation
  1. Remove all vowels.
  2. Remove all spaces.
  3. Replace vowels with '*'.
  4. Replace spaces with '_'.
  5. Remove all digits.
  6. Remove duplicate characters.
  7. Keep only the first occurrence of each character.
  8. Remove consecutive duplicates.
  9. Swap case (upper→lower, lower→upper).
  10. Shift each character by 1 ('abc'→'bcd').
Category 5 — Word-level Thinking
  1. Print each word on a new line.
  2. Count words with even length.
  3. Find the longest word.
  4. Find the shortest word.
  5. Swap first and last words.
  6. Print words that start and end with the same letter.
  7. Count words containing 'a'.
  8. Capitalize the first letter of each word.
  9. Print the sentence in title case.
  10. Remove extra spaces between words.
Phase 6
Mixed Logical Challenges
Applied Reasoning · 30–40 Questions
Category 1 — Number-Based Combinations
  1. Print all numbers (1–N) divisible by both 3 and 5.
  2. Find sum of digits using a loop.
  3. Check if a number is an Armstrong number.
  4. Print all Armstrong numbers between 1 and 1000.
  5. Find factorial using recursion.
  6. Count even digits in a number.
  7. Print all primes between 1 and N.
  8. Reverse a number (123→321).
  9. Check if a number is a palindrome.
  10. Check if a number is perfect.
Category 2 — String + Logic Mix
  1. Check if two strings are anagrams (no collections).
  2. Count vowels in each word of a sentence.
  3. Reverse words with even length.
  4. Replace vowels with their position (a=1, e=2...).
  5. Print characters appearing more than once (no map).
  6. Count words starting and ending with the same letter.
  7. Toggle case for every alternate word.
  8. Check if two strings are rotations of each other.
  9. Find the word with the maximum vowels.
  10. Remove duplicate words from a sentence.
Category 3 — Array + Looping Logic
  1. Find max and min element.
  2. Count positive, negative, and zero elements.
  3. Print all unique elements.
  4. Reverse an array in-place.
  5. Shift all zeros to the end.
  6. Count elements that are even at an even index.
  7. Merge two arrays into one.
  8. Find the second largest element.
  9. Rotate an array right by one.
  10. Find sum of elements at odd indices.
Category 5 — Applied Reasoning
  1. Given student marks, count how many passed (≥ 40).
  2. Count adults, minors, and seniors from age inputs.
  3. Validate a password (uppercase, lowercase, digit, special char).
  4. Simulate a simple calculator using switch-case.
  5. Print frequency of each digit in a number.
  6. Find common elements between two arrays.
  7. Print characters common to two strings.
  8. Count prime numbers in an array.
  9. 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.

💻
450 DSA Question Sheet

14 topics · 450 curated problems · Excel format (.xlsx)

Source: Love Babbar  ·  Covers Arrays, Strings, DP, Graphs, Trees & more

Download Sheet