Preppro programming sheet for beginners
Table of Contents
Top 100 topic based problems for topic wise practice:
Operators:
- Program to calculate area of a triangle
- Program to calculate area of a circle
- Program to calculate area of a cylinder
- Program to calculate area of a rectangle
- Program to calculate area of a cone
- Program to calculate perimeter of a triangle
- Program to calculate perimeter of a circle
- Swap two variables without using third variable
- Sum of n natural numbers.
Conditional statements:
- Check whether the number is even or odd
- Check whether the number is positive, negative or zero.
- Check whether the year is leap year or not.
- Program to find those numbers which are divisible by 7 and multiples of 5, between 1500 and 2700 (both included).
Loops:
- Factorial of a number
- Integer palindrome
- Check whether the number is Prime number or not
- Fibonacci series
- Check whether the given number is armstrong
- Sum of squares of digits of a number.
Pattern problems:
- Grid pattern
- Right angled triangle (normal and inverted) both sides
- Equilateral triangle (normal and inverted)
- Rhombus pattern
- Number patterns
- Alphabetical patterns
Arrays and Lists:
- Largest element in an array
- Second largest element in an array
- Smallest element in an array
- Sum of elements in an array
- Frequency of elements in an array
- Remove duplicates from an array
- Right rotation of an array
- Left rotation of an array
- Sort 1st half in ascending and second half in descending order
- Moving zeros to the end of an array
- sorting
- Sort an array of 0s 1s and 2s
- Maximum subarray sum
2d arrays:
- Matrix addition and subtraction
- Search an element in a matrix
- Rotate matrix by 90 degrees
- Row column wise sorting of a matrix
- Find nth smallest in row column wise sorted matrix
Strings:
- String palindrome
- Check if a vowel is present in the string
- Remove duplicates from a string
- Frequency of characters in a string
- Check whether the string is anagram or not
- Check whether the string is pangram
- Reverse each word in a given string
- Remove vowels from a string
- Balanced parentheses
- Replace substring in a string
- Print all permutations of a given string in lexicographic order
Functions
- Inheritance
- Polymorphism
- Encapsulation
- Abstraction
Recursion and Backtracking:
- Print name n times using recursion
- Sum of n natural numbers using recursion
- Factorial using recursion
- Fibonacci series using recursion
- Count good numbers
- Tower of hanoi
- N queens
- Rat in a maze
- Subset Sum
- Permutations of a string
Array List / List:
- Right rotation of an array
- Left rotation of an array
- Sort 1st half in ascending and second half in descending order
- Moving zeros to the end of an array
- sorting
- Sort an array of 0s 1s and 2s
- Maximum subarray sum
- Find highest/lowest non-repeated element
Linked List:
- Reverse a linked list
- Find the middle of linked list
- Merge two sorted linked lists
- Remove nth node from end of the list
Advanced:
- Check if a linked list is a palindrome
- Intersection of two linked lists
- Sort a linked list of 0’s 1’s and 2s by changing links
- Add two numbers in linked lists
Hash Set and HashMap / Sets and Dictionaries:
- Find duplicate elements in an array
- Find unique elements in an array
- Intersection of two arrays
- Find frequency of elements in an array
- Find first duplicate element in an array
Stacks and Queues:
- valid parentheses
- Next greater element
- Min stack
- First non repeating character in a string
- Implement queue using stack
Sliding window problems
Bit Manipulation:
- Check if a number is power of 2 or not
- Check if a number is odd or even
- Set the ith bit
- Count the number of set bits
- Divide two integers without using multiplication, division and mod operator
- Swap two numbers(using xor)
- Find missing number in an array
- Binary representation of a decimal number
Trees:
- Binary tree and types implementations
- Binary search Tree Implementation
- Tree traversals
- Height of a binary tree
- Check if the binary tree is height-balanced or not
- Check if a tree is binary search tree or not
Heaps:
- Introduction to Priority Queues using Binary Heaps
- Min- heap and Max- heap implementation
- Check if an array represents a min-heap or not
- Convert min heap to max heap
- Kth largest element in an array
Sorting and Searching Algorithms:
- Bubble sort
- Insertion sort
- Selection sort
- Linear search
- Merge sort
- Quick sort
- Binary search
Greedy Algorithms:
- Assign cookies
- Lemonaid change
- Fractional knapsack problem
- valid parentheses checker
Graphs:
- Graph representation
- Bfs and Dfs traversals
- Shortest path algorithms
- Minimum spanning tree
- Connected components
- Disjoint set data structure
Dynamic Programming:
- Climbing stairs
- Number of Islands
- Coin change
- Longest common subsequence
Ivanni solve chesthey (total 144 problems) meeku coding vasthundi, consistency is important
there are more problems to practice and some of these problems are from leetcode. so solve them in leetcode to build a strong coding profile.