C++_Problems
C++_Problems
Easy Problems
Intermediate Problems
Implement a circular linked list and perform basic operations (insert, delete,
display)
Detect a cycle in a linked list
Find the intersection point of two linked lists
Implement a stack using linked list
Implement a queue using linked list
Convert an infix expression to postfix
Evaluate a postfix expression
Implement a binary search tree and perform basic operations (insert, delete,
search)
Find the height of a binary tree
Find the level order traversal of a binary tree
Find the inorder traversal of a binary tree without recursion
Find the preorder traversal of a binary tree without recursion
Find the postorder traversal of a binary tree without recursion
Find the diameter of a binary tree
Check if a binary tree is balanced
Find the lowest common ancestor of two nodes in a binary tree
Implement a heap and perform basic operations (insert, delete, heapify)
Find the k largest elements in an array
Implement a graph and perform basic operations (add edge, remove edge, display)
Perform a depth-first search (DFS) on a graph
Perform a breadth-first search (BFS) on a graph
Check if a graph is connected
Find the shortest path in a graph using Dijkstra's algorithm
Find the shortest path in a graph using Floyd-Warshall algorithm
Find the minimum spanning tree of a graph using Kruskal's algorithm
Find the minimum spanning tree of a graph using Prim's algorithm
Check if a graph contains a cycle
Find the strongly connected components of a graph
Implement the topological sort of a graph
Find the longest increasing subsequence in an array
Find the longest common subsequence of two strings
Find the edit distance between two strings
Find the maximum subarray sum using Kadane's algorithm
Find the longest palindromic substring in a string
Find the number of ways to make change for a given amount
Implement a trie and perform basic operations (insert, search, delete)
Find the number of islands in a 2D grid
Find the largest rectangle in a histogram
Find the maximum profit that can be made by buying and selling a stock
Find the maximum size subarray with a given sum
Implement a hash table and perform basic operations (insert, delete, search)
Find the maximum product subarray
Find the majority element in an array
Implement a priority queue using a heap
Find the minimum number of jumps to reach the end of an array
Find the longest substring without repeating characters
Find the number of unique paths in a grid
Solve the N-Queens problem
Solve the Sudoku puzzle
Find the maximum sum path in a binary tree
These problems should provide a good range of challenges from easy to intermediate
levels.
not use dsa questions use topics of array,function,pointers,dynamic memory
allocation,string,structure,file handling and more
ChatGPT
Sure, here is a list of 100 C++ coding problems that focus on topics like arrays,
functions, pointers, dynamic memory allocation, strings, structures, and file
handling, progressing from easy to intermediate:
Easy Problems
Arrays
Functions
Pointers
Intermediate Problems
Strings
Structures
Define a structure for a student with name, roll number, and marks.
Write a function to print the details of a student.
Write a function to find the student with the highest marks.
Implement an array of structures.
Write a function to sort an array of structures.
Write a program to demonstrate nested structures.
Implement a structure with dynamic memory allocation.
Define a structure to store date and implement a function to compare two dates.
Define a structure to store complex numbers and implement addition and
subtraction.
Write a function to read and write a structure to a file.
File Handling
Miscellaneous
Implement a program to find the longest common prefix among a set of strings.
Write a program to find the longest palindromic substring in a string.
Implement a program to find the longest increasing subsequence in an array.
Write a program to rotate an array by k positions.
Implement a program to find the kth smallest element in an array.
Write a program to find the maximum product subarray.
Implement a program to find the majority element in an array.
Write a program to find the minimum number of jumps to reach the end of an
array.
Implement a program to find the longest substring without repeating characters.
Write a program to solve the N-Queens problem.