Skip to content
- Print the sum of two numbers
- Print the sum of three numbers
- Calculate the average of three numbers
- Check if a number is even or odd
- Swap two numbers using third variable
- Swap two numbers without using third variable
- Find the maximum of two numbers
- Find the minimum of two numbers
- Calculate the factorial of a number using iterative method
- Calculate the factorial of a number using a recursive function
- Print Fibonacci series using iterative method
- Print Fibonacci series using recursive method
- Check if a number is a prime
- Check if a number is a palindrome using an iterative method
- Check if a number is a palindrome using recursive method
- Find the reverse of a number
- Calculate the power of a number
- Print multiplication table
- Find the square root of a number
- Calculate the area of a triangle
- Calculate the area of a rectangle
- Calculate the area of a circle
- Check if a year is a leap year
- Convert temperature from Celsius to Fahrenheit
- Convert temperature from Fahrenheit to Celsius
- Convert a decimal number to binary
- Convert a binary number to decimal
- Convert a decimal number to hexadecimal
- Convert a hexadecimal number to decimal
- Check if a string is a palindrome
- Find the length of a string
- Concatenate two strings
- Compare two strings
- Copy one string to another
- Reverse a string
- Count the number of vowels in a string
- Count the number of words in a string
- Sort an array in ascending order
- Sort an array in descending order
- Find the largest element in an array
- Find the smallest element in an array
- Calculate the sum of elements in an array
- Calculate the average of elements in an array
- Search for an element in an array
- Insert an element in an array
- Delete an element from an array
- Merge two arrays
- Reverse an array
- Multiply two matrices
- Add two matrices
- Subtract two matrices
- Transpose a matrix
- Check if a matrix is symmetric
- Find the sum of the main diagonal elements of a matrix
- Find the sum of the secondary diagonal elements of a matrix
- Calculate the determinant of a matrix
- Multiply two complex numbers
- Add two complex numbers
- Subtract two complex numbers
- Calculate the GCD of two numbers
- Calculate the LCM of two numbers
- Generate random numbers
- Implement bubble sort algorithm
- Implement selection sort algorithm
- Implement insertion sort algorithm
- Implement merge sort algorithm
- Implement quicksort algorithm
- Implement binary search algorithm
- Implement linear search algorithm
- Implement stack using an array
- Implement stack using a linked list
- Implement queue using an array
- Implement queue using a linked list
- Implement circular queue
- Implement singly linked list
- Implement doubly linked list
- Implement binary tree
- Implement binary search tree
- Implement heap data structure
- Implement graph data structure
- Implement breadth-first search algorithm
- Implement depth-first search algorithm
- Implement Dijkstra’s algorithm
- Implement Kruskal’s algorithm
- Implement Prim’s algorithm
- Implement Bellman-Ford algorithm
- Implement Floyd-Warshall algorithm
- Implement topological sorting algorithm
- Implement bubble sort for a linked list
- Implement insertion sort for a linked list
- Implement merge sort for a linked list
- Implement quicksort for a linked list
- Implement selection sort for a linked list
- Implement binary search for a linked list
- Implement a circular linked list
- Implement a priority queue
- Implement a hash table
- Implement a binary search tree (BST) with insert, search, and delete operations
- Implement a stack using queues
- Implement a queue using stacks
- Implement a trie data structure
- Implement the breadth-first traversal of a binary tree
- Implement the depth-first traversal (preorder, inorder, postorder) of a binary tree
- Implement the iterative inorder traversal of a binary tree
- Implement the Morris inorder traversal of a binary tree
- Implement the iterative preorder traversal of a binary tree
- Implement the iterative postorder traversal of a binary tree
- Implement the level-order traversal of a binary tree
- Implement the inorder successor in a binary search tree
- Implement the LRU (Least Recently Used) cache algorithm
- Implement the radix sort algorithm
- Implement the counting sort algorithm
- Implement the bucket sort algorithm
- Implement the shell sort algorithm
- Implement the Boyer-Moore string search algorithm
- Implement the Knuth-Morris-Pratt (KMP) string search algorithm
- Implement the Rabin-Karp string search algorithm
- Implement the AVL tree with insert, search, and delete operations
- Implement the Red-Black tree with insert, search, and delete operations
- Implement the B-tree with insert and search operations
- Implement the Trie data structure for autocomplete suggestions
- Implement the A* search algorithm
- Implement the Floyd-Warshall algorithm for all pairs shortest paths
- Implement the Ford-Fulkerson algorithm for maximum flow
- Implement the Kruskal’s algorithm for minimum spanning tree
- Implement the Prim’s algorithm for minimum spanning tree
- Implement the Bellman-Ford algorithm for single-source shortest path
- Implement the Dijkstra’s algorithm for single-source shortest path
- Implement the Depth-First Search (DFS) algorithm
- Implement the Breadth-First Search (BFS) algorithm
- Implement the Strongly Connected Components (SCC) algorithm using Tarjan’s algorithm
- Implement the Minimum Spanning Tree (MST) using the Boruvka’s algorithm
- Implement the Longest Common Subsequence (LCS) algorithm
- Implement the Longest Increasing Subsequence (LIS) algorithm
- Implement the 0/1 Knapsack problem using dynamic programming
- Implement the Matrix Chain Multiplication (MCM) problem using dynamic programming
- Implement the Edit Distance algorithm using dynamic programming
- Implement the Coin Change problem using dynamic programming
- Implement the Subset Sum problem using dynamic programming
- Implement the N-Queens problem using backtracking
- Implement the Sudoku solver using backtracking
- Implement the Hamiltonian Cycle problem using backtracking
- Implement the Graph Coloring problem using backtracking
- Implement the Traveling Salesman Problem (TSP) using dynamic programming
- Implement the Huffman coding algorithm for data compression
- Implement the RSA algorithm for encryption and decryption
- Implement the SHA-256 algorithm for secure hashing
- Implement the MD5 algorithm for hashing
- Implement the DES algorithm for encryption and decryption
- Implement the AES algorithm for encryption and decryption
- Implement the Bubble Sort algorithm for strings
- Implement the Selection Sort algorithm for strings
- Implement the Insertion Sort algorithm for strings
- Implement the Merge Sort algorithm for strings
- Implement the Quick Sort algorithm for strings
- Implement the Counting Sort algorithm for strings
- Implement the Radix Sort algorithm for strings
- Implement the Shell Sort algorithm for strings
- Implement the Binary Search algorithm for strings
- Implement the Linear Search algorithm for strings
- Implement the Run-Length Encoding algorithm for strings
- Implement the Caesar Cipher algorithm for encryption and decryption of strings
- Implement the Vigenère Cipher algorithm for encryption and decryption of strings
- Implement the Rail Fence Cipher algorithm for encryption and decryption of strings
- Implement the Reverse a String algorithm
- Implement the Check if a String is Palindrome algorithm
- Implement the Count the Number of Vowels in a String algorithm
- Implement the Count the Number of Words in a String algorithm
- Implement the Check if two Strings are Anagrams algorithm
- Implement the Check if a String is a Pangram algorithm
- Implement the Check if a String is a Substring of Another algorithm
- Implement the Check if a String is a Rotation of Another algorithm
- Implement the Remove Duplicates from a String algorithm
- Implement the Replace Spaces in a String with %20 algorithm
- Implement the Find the First Non-Repeated Character in a String algorithm
- Implement the Find the Longest Palindromic Substring in a String algorithm
- Implement the Check if a String is a Valid Parentheses sequence algorithm
- Implement the Convert String to Integer algorithm
- Implement the Convert Integer to Roman Numeral algorithm
- Implement the Convert Roman Numeral to Integer algorithm
- Implement the Find the Missing Number in an Array algorithm
- Implement the Find the Duplicate Number in an Array algorithm
- Implement the Find the Majority Element in an Array algorithm
- Implement the Find the Kth Largest Element in an Array algorithm
- Implement the Find the Peak Element in an Array algorithm
- Implement the Find the Missing Number in a Sorted Array algorithm
- Implement the Find the Maximum Subarray Sum algorithm
- Implement the Find the Longest Increasing Subarray algorithm
- Implement the Find the Longest Common Prefix algorithm
- Implement the Check if an Array is Sorted algorithm
- Implement the Rotate an Array algorithm
- Implement the Merge Two Sorted Arrays algorithm
- Implement the Find the Union of Two Arrays algorithm
- Implement the Find the Intersection of Two Arrays algorithm
- Implement the Find the Smallest Missing Positive Number in an Unsorted Array algorithm
- Implement the Sort an Array of 0s, 1s, and 2s algorithm
- Implement the Find the Two Elements with Sum Closest to Zero in an Array algorithm
- Implement the Find the Elements with Sum Closest to Zero
- Implement the Find the Elements with Sum Closest to a Given Number in an Array algorithm
- Implement the Find the Triplet with Sum Closest to a Given Number in an Array algorithm
- Implement the Find the Pair with Given Difference in an Array algorithm
- Implement the Find the Longest Consecutive Subsequence in an Array algorithm
- Implement the Find the Majority Element in a Sorted Array algorithm
- Implement the Find the Maximum Product Subarray algorithm
- Implement the Find the Maximum Sum Subarray algorithm
- Implement the Find the Subarray with Given Sum algorithm
- Implement the Find the Longest Subarray with Equal 0s and 1s algorithm
- Implement the Find the Longest Subarray with Equal 1s and 0s algorithm
- Implement the Find the First Repeating Element in an Array algorithm
- Implement the Find the Leaders in an Array algorithm
- Implement the Find the Next Permutation of an Array algorithm
- Implement the Find the Previous Permutation of an Array algorithm