Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.8K+ articles
DSA
20.1K+ articles
Misc
8.2K+ articles
Mathematical
7.5K+ articles
Arrays
5.9K+ articles
Competitive Programming
3.0K+ articles
Strings
2.9K+ articles
Greedy
2.0K+ articles
Matrix
1.0K+ articles
cpp-puzzle
32+ articles
programming-puzzle
49 posts
Recent Articles
Popular Articles
Minimum amount of lamps needed to be installed
Last Updated: 09 September 2022
Given string str containing only dots and asterisk. A dot represents free spaces and*represents lamps. A lamp at positionican spread its light at locations i-1, i, and i+1...
read more
Strings
Python
DSA
programming-puzzle
Distribution of candies according to ages of students
Last Updated: 08 May 2023
Given two integer arrays ages and packs where ages store the ages of different students and an element of pack stores the number of candies that packet has (complete array...
read more
Greedy
Python
DSA
programming-puzzle
Generate a sequence with the given operations
Last Updated: 07 December 2022
Given a stringSwhich contains onlyI(increase) andD(decrease). The task is to return any permutation of integers [0, 1, ..., N] where N ? Length of S such that for all i = ...
read more
Strings
DSA
limited-range-elements
programming-puzzle
Time taken by two persons to meet on a circular track
Last Updated: 08 July 2022
Given integers L, S1 and S2 where L is the length of a circular track in meters, S1 and S2 are the speeds of two persons in kilometers/hour moving in the same direction on...
read more
Mathematical
Technical Scripter 2018
DSA
GCD-LCM
programming-puzzle
Final string after performing given operations
Last Updated: 08 December 2022
Given a string str containing only characters x and y, the task is to perform the following operations while possible:Find an index such that s[i] = 'x' and s[i+1] = 'y' a...
read more
Strings
DSA
binary-string
programming-puzzle
Split a number into 3 parts such that none of the parts is divisible by 3
Last Updated: 31 August 2023
You are given the number N. Your task is to split this number into 3 positive integers x, y, and z, such that their sum is equal to 'N' and none of the 3 integers is a mul...
read more
Mathematical
DSA
divisibility
programming-puzzle
Check if number can be displayed using seven segment led
Last Updated: 05 March 2023
Given a string str representing an integer and an integer led which is the count of LEDs available. The task is to check if it is possible to display the number using the ...
read more
Strings
Mathematical
DSA
programming-puzzle
Jump in rank of a student after updating marks
Last Updated: 13 September 2022
Given three arrays names[], marks[] and updates[] where:names[] contains the names of students.marks[] contains the marks of the same students.updates[] contains the integ...
read more
Algorithms
Searching
DSA
Arrays
Sorting Quiz
programming-puzzle
A Sum Array Puzzle
Last Updated: 26 October 2023
Given an array arr[] of n integers, construct a Sum Array sum[] (of same size) such that sum[i] is equal to the sum of all the elements of arr[] except arr[i]. Solve it wi...
read more
Mathematical
DSA
Arrays
prefix
programming-puzzle
Find the non decreasing order array from given array
Last Updated: 23 June 2022
Given an array A[] of size N / 2, the task is to construct the array B[] of size N such that:B[] is sorted in non-decreasing order.A[i] = B[i] + B[n - i + 1].Note: Array A...
read more
Greedy
Mathematical
Competitive Programming
DSA
programming-puzzle
Pizza Problem
Last Updated: 13 March 2023
Given an integer N and a pizza which can be cut into pieces, each cut should be a straight line going from the center of the pizza to its border. Also, the angle between a...
read more
C++ Programs
Computer Science Fundamentals
DSA
programming-puzzle
Filling diagonal to make the sum of every row, column and diagonal equal of 3x3 matrix
Last Updated: 08 December 2022
Given 9 elements in a 3 x 3 matrix where the value of diagonals is 0. We need to find the values in the diagonal to make the sum of every row, column, and diagonal equal.E...
read more
Matrix
C++ Programs
DSA
programming-puzzle
Count number of trailing zeros in (1^1)*(2^2)*(3^3)*(4^4)*..
Last Updated: 23 June 2022
Given an integer n, the task is to find the number of trailing zeros in the functionf(n)=\prod\limits_{i = 1}^{n} i^{i}i.e. f(n) = 11 * 22 * 33 * ... * nn.Examples:Input: ...
read more
Mathematical
DSA
programming-puzzle
maths-power
Number of wins for each player in a series of Rock-Paper-Scissor game
Last Updated: 02 August 2021
Two players are playing a series of games of Rock–paper–scissors. There are a total of K games played. Player 1 has a sequence of moves denoted by string A and similarly p...
read more
Algorithms
DSA
programming-puzzle
Find the minimum number of preprocess moves required to make two strings equal
Last Updated: 24 March 2023
Given two strings A and B of equal lengths consisting of lower case English letters. The task is to count the minimum number of pre-processing moves on string A required t...
read more
Strings
Competitive Programming
DSA
programming-puzzle
1
2
3
4
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !