Courses
Tutorials
Jobs
Practice
Contests
Data Structure
Java
Python
HTML
Interview Preparation
Trending Now
DSA
Web Tech
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
System Design
Django
DevOps Tutorial
Java
C
C++
ReactJS
NodeJS
CP Live
Aptitude
Puzzles
Projects
GBlog
Frontend Developer Roadmap 2024
Frontend development means to design the face of a website or application. It involves working on the appearance of the website. Building interactive buttons, using images...
Read More
Count N-digit numbers such that every position is divisible by the digit at that position
Given a positive integer N, the task is to count the number of N-digit numbers such that every index (1-based indexing) in the number is divisible by the digit occurring a...
Read More
Dynamic Programming
Mathematical
number-digits
Permutation and Combination
DSA
Count of substrings in a Binary String that contains more 1s than 0s
Given a binary string s, the task is to calculate the number of such substrings where the count of 1's is strictly greater than the count of 0's.ExamplesInput: S = "110011...
Read More
Strings
Divide and Conquer
Competitive Programming
binary-string
inversion
Merge Sort
substring
DSA
Minimize moves required to make array elements equal by incrementing and decrementing pairs | Set 2
Given an array arr[] of size N, the task is to print the minimum number of moves required to make all array elements equal by selecting any pair of distinct indices and th...
Read More
Arrays
Greedy
Mathematical
array-rearrange
DSA
Check if N given lines can be intersected by K vertical lines
Given N horizontal lines represented by an array position[][] of size N, where position[i] represents the ith horizontal line which has x-coordinates from position[i][0] t...
Read More
Greedy
Sorting
Mathematical
Geometric
Geometric-Lines
DSA
Maximum profit after buying and selling the stocks with transaction fees | Set 2
Given an array arr[] of positive integers representing prices of stocks and an integer transactionFee, the task is to find the maximum profit possible after buying and sel...
Read More
Arrays
Dynamic Programming
Mathematical
DSA
Maximize product of sum of speeds of K workers and their minimum efficiency
Given an integer N, representing the number of workers, an array speed[ ], where speed[i]represents the speed of the ith worker, and an array efficiency[ ], where efficien...
Read More
Arrays
Greedy
Sorting
Mathematical
priority-queue
cpp-priority-queue
DSA
Modify a Linked List to contain last occurrences of every duplicate element
Given an unsorted Singly Linked List consisting of N nodes that may contain duplicate elements, the task is to remove all but the last occurrence of duplicate elements fro...
Read More
Linked List
Linked Lists
Reverse
Data Structures
DSA
Hungarian Algorithm for Assignment Problem | Set 2 (Implementation)
Given a 2D array, arr of size N*N where arr[i][j] denotes the cost to complete the jth job by the ith worker. Any worker can be assigned to perform any job. The task is to...
Read More
Google
Graph
Mathematical
DSA
Find Binary string by converting all 01 or 10 to 11 after M iterations
Given a binary string str[] of size N and an integer M. This binary string can be modified by flipping all the 0's to 1 which have exactly one 1 as a neighbour. The task i...
Read More
Strings
Bit Magic
Pattern Searching
Searching
binary-string
DSA
Altitude of largest Triangle that can be inscribed in a Rectangle
Given a rectangle of length L and breadth B, the task is to print the maximum integer altitude possible of the largest triangle that can be inscribed in it, such that the ...
Read More
Searching
Mathematical
Geometric
triangle
square-rectangle
DSA
Construct array B as last element left of every suffix array obtained by performing given operations on every suffix of given array
Given an array arr[] of N integers, the task is to print the last element left of every suffix array obtained by performing the following operation on every suffix of the ...
Read More
Arrays
Suffix-Array
DSA
Find non-decreasing array brr[] of size 2*N such that each arr[i] equals sum of brr[i] and brr[2*n – i +1]
Given an array arr[] of size N, the task is to find another array brr[] of size 2*N such that it is non-decreasing and for each ith from 1 to N arr[i] = brr[i] + brr[2*n -...
Read More
Arrays
Pattern Searching
DSA
Order of removal in Josephus problem in O(N logN)
Given N children standing in a circle waiting to be executed, and a number K, which indicates that K-1 children are skipped in the clockwise direction, and the Kth child i...
Read More
Algorithms
Advanced Data Structure
DSA
Find the frequency of each element in a sorted array
Given a sorted array, arr[] consisting of N integers, the task is to find the frequencies of each array element.Examples:Input: arr[] = {1, 1, 1, 2, 3, 3, 5, 5, 8, 8, 8, 9...
Read More
Arrays
Algorithms
Searching
Hash
frequency-counting
DSA
Find an array B with at least arr[i] elements in B not equal to the B[i]
Given an array arr[] of size N, the task is to find an array of size N, such that for every ith element of the array arr[], the output array should contain at least arr[i]...
Read More
Arrays
Sorting
DSA
1
...
5683
5684
5685
...
11268