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
Three 90 Challenge: Bigger and Better
As we transit into the new phase, it's essential to fuel our inner drive for success. On popular demand, GeeksforGeeks is happy to announce that we are back with the Thre...
Read More
Count of numbers upto M divisible by given Prime Numbers
Given an array arr[] of Prime Numbers and a number M, the task is to count the number of elements in the range [1, M] that are divisible by any of the given prime numbers....
Read More
Arrays
Dynamic Programming
Mathematical
Competitive Programming
sieve
Prime Number
divisibility
Maths
DSA
Count of all possible pairs having sum of LCM and GCD equal to N
Given an integer N, the task is to find the count of all possible pairs of integers (A, B) such that GCD (A, B) + LCM (A, B) = N.Examples:Input: N = 14Output: 7Explanation...
Read More
Searching
Mathematical
GCD-LCM
DSA
Coplanarity of Two Lines in 3D Geometry
Given two lines L1 and L2, each passing through a point whose position vector are given as (X, Y, Z) and parallel to line whose direction ratios are given as (a, b, c), th...
Read More
Mathematical
Geometric
Matrix
Mensuration 3D
DSA
Reduce given three Numbers by decrementing in Pairs
Given three integers A, B, and C. In one operation, choose any two of the three integers, subject to the condition that both of them should be greater than 0, and reduce t...
Read More
Sorting
Mathematical
DSA
Most similar string
Given a string str and an array of strings arr[] of size N, the task is to print a string from arr[], which has maximum count of matching characters with str.Examples:Inpu...
Read More
Strings
Hash
Advanced Data Structure
School Programming
frequency-counting
DSA
Pair of integers with difference K having an element as the K-th multiple of the other
Given an integer K, the task is to find a pair of numbers (A, B) such that A - B = K and A / B = K. If no such pair can be generated, print "No".Examples:Input: K = 6Outpu...
Read More
Greedy
Mathematical
divisibility
DSA
Various properties of CAP Theorem
Prerequisite – The CAP TheoremIn the distributed system you must have heard of the term CAP Theorem. CAP theorem states that it is impossible to achieve all of the three p...
Read More
DBMS
Software Engineering
Minimize increment/decrement of Array elements to make each modulo K equal
Given an array arr[] of length N and an integer K. In each operation any element(say arr[i]) can be selected from the array and can be changed to arr[i] + 1 or arr[i] - 1....
Read More
Arrays
Mathematical
Hash
Competitive Programming
Modular Arithmetic
C++ Programs
DSA
Find a number M < N such that difference between their XOR and AND is maximum
Given a natural number N, the task is to find a number M smaller than N such that the difference between their bitwise XOR (N ^ M) and bitwise AND (N M) is maximum.Exampl...
Read More
Bit Magic
Greedy
Mathematical
Bitwise-XOR
Bitwise-AND
Maths
DSA
Sum of largest divisor of numbers upto N not divisible by given prime number P
Given a number N and a prime number P, the task is to find the sum of the largest divisors of each number in the range [1, N], which is not divisible by P.Examples:Input: ...
Read More
Greedy
Mathematical
prime-factor
Recursion
Numbers
array-range-queries
divisors
Natural Numbers
DSA
Sort the Array of Strings on the basis of given substring range
Given two positive integers I and X and an array of strings arr[], the task is to sort the given array of strings on the basis of substrings starting from index I of size ...
Read More
Arrays
Strings
Sorting
Hash
array-range-queries
substring
DSA
Rearrange a string according to the given indices
Given a string S and an array index[], the task is to rearrange the string S by placing every character S[i] to position index[i].ExampleInput: S = "geeksforgeeks", index[...
Read More
Arrays
Strings
array-rearrange
python-list
DSA
Overview of Scaling: Vertical And Horizontal Scaling
Given architecture is an example of a client-server based system. In this, there is a client who sends requests to the server and then the client receives a response from ...
Read More
Computer Subject
DBMS
Placements
Software Engineering
System-Design
Number of containers that can be filled in the given time
Given a number N and a time X unit, the task is to find the number of containers that are filled completely in X unit if containers are arranged in pyramid fashion as show...
Read More
Greedy
Mathematical
Puzzles
DSA
How to create customized Buttons in Android with different shapes and colors
A Button is a user interface that are used to perform some action when clicked or tapped. In this article, we will try to change the shape and color of Button to various ...
Read More
Android
Android-Button
1
...
7419
7420
7421
...
11229