GO
CPP-DSA Archives - GeeksforGeeks
Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.8K+ articles
C++
3.8K+ articles
Microsoft
810+ articles
Binary Search
537+ articles
Oracle
354+ articles
Flipkart
259+ articles
Java 8
142+ articles
BubbleSort
23+ articles
CPP
20+ articles
CPP-DSA
95 posts
Recent Articles
Maximum Days to Buy Grocery Items
Last Updated: 10 November 2026
You are planning to buy n different grocery items from the market, and you have a budget constraint for each item. Specifically, you are given an array budget[] of size n,...
read more
DSA
Binary Search
CPP-DSA
First Digit of Number
Last Updated: 10 November 2026
Given a number n, find the first digit of the number.Examples:Input: n = 123Output: 1Input: n = 976Output: 9Table of Content[Naive Approach] Repeatedly Divide by 10 - O(lo...
read more
DSA
CPP
CPP-DSA
Input a Line Question
Last Updated: 04 November 2026
In programming, reading a line of input means accepting a string from the user. The input may contain multiple words separated by spaces.For example, if the input is "Geek...
read more
DSA
CPP-DSA
Learning to be Precise
Last Updated: 30 October 2026
There are times when a floating-point number contains an undesired number of digits after the decimal point.Here, we'll learn how to get a precise answer from a floating-p...
read more
DSA
CPP-DSA
Print With Separator
Last Updated: 31 October 2026
In programming, printing strings with a separator means displaying two strings on the same line with a specified symbol between them. This can be done using an output stat...
read more
DSA
CPP-DSA
Print with New Line
Last Updated: 27 October 2026
There is a string "Geeks for Geeks", print each word on a separate line.Note: No input required for this problem.Example:Input: Not RequiredOutput:GeeksforGeeksExplanatio...
read more
DSA
CPP
CPP-DSA
If Statement Practice
Last Updated: 20 October 2026
Given a number n, use the if statement to print "Big" (without quotes) if the given number is greater than 100. The statement "Number" (without quotes) will be printed reg...
read more
DSA
Java 8
CPP
CPP-DSA
Type Conversion
Last Updated: 15 October 2026
Given a double value d, typecast it to an integer value and print it.Examples:Input: d = 10.23Output: 10Explanation: The integer value of 10.23 is 10Input: d = 19.1Output:...
read more
DSA
Java 8
python
CPP-DSA
C++ Program to Implement Suffix Array
Last Updated: 23 July 2025
A suffix array is a data structure which can be used to store all possible suffixes of a given string in the sorted order. It stores the starting indices of the suffixes i...
read more
C++
Picked
CPP-DSA
Knuth-Morris-Pratt in C++
Last Updated: 23 July 2025
The Knuth-Morris-Pratt (KMP) is an efficient string-matching algorithm developed by Donald Knuth, Vaughan Pratt, and James H. Morris in 1977. It is used for finding a spec...
read more
C++
Picked
CPP-DSA
Rod Cutting Problem in C++
Last Updated: 23 July 2025
The Rod Cutting Problem is a classic dynamic programming problem where a rod of length N and a list of prices for smaller pieces of rod is given, and the task is to determ...
read more
C++
Picked
CPP-DSA
Counting Set Bits in C++
Last Updated: 23 July 2025
Counting set bits means determining how many bits in a binary representation of a number are set to 1.ExampleInput: n = 103 (01100111)Output: 5Explanation: The bina...
read more
C++
Picked
CPP-DSA
Shortest Path Algorithm in C++
Last Updated: 23 July 2025
The shortest path algorithms are used to find the most efficient route fromsource nodetodestination nodeof a graph in optimal time and space complexities. In this article,...
read more
C++
Picked
CPP-DSA
Prim's Algorithm in C++
Last Updated: 23 July 2025
Prim's Algorithm is a greedy algorithm that is used to find the Minimum Spanning Tree (MST) for a weighted, undirected graph. MST is a subset of the graph's edges that con...
read more
C++
Picked
CPP-DSA
Uber's Online Test Experience
Last Updated: 23 July 2025
Online test problems excite some people and make others very nervous. A fascinating challenge popped up in the Uber online test: Participants had to find the shortest path...
read more
Interview Experiences
Shortest Path
DFS
Uber
Experiences
CPP-DSA
1
2
3
4
5
6
7