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
How to add Site Header, Site Title, Index Title in a Django Project?
Automatic admin interface one of the most powerful parts of Django. Metadata is read from your models to provide a quick, model-centric interface where trusted users can m...
Read More
Misc
Python
Python Django
All About Smart India Hackathon (SIH) 2020 - Software Edition
Smart India Hackathon is a nationwide 36-hour Hackathon organized by the MHRD, Govt. of India. It started in the year 2017 and gaining huge success, it is now an annual ev...
Read More
GBlog
Generic For Loop in Java
When we know that we have to iterate over a whole set or list, then we can use Generic For Loop. Java's Generic has a new loop called for-each loop. It is also called enha...
Read More
Misc
Java
Java-Generics
Print Nodes which are not part of any cycle in a Directed Graph
Given a directed graph G N nodes and E Edges consisting of nodes valued [0, N – 1] and a 2D array Edges[][2] of type {u, v} that denotes a directed edge between vertices u...
Read More
Arrays
Graph
DFS
Recursion
Graph Traversals
graph-cycle
DSA
Count nodes having smallest value in the path from root to itself in a Binary Tree
Given a Binary Tree, the task is to count the number of nodes in the given Binary Tree such that the path from the root to that node contains node with value greater than ...
Read More
Tree
Preorder Traversal
Searching
Recursion
Tree Traversals
DSA
Minimize deletions in a Binary String to remove all subsequences of the form "0101"
Given a binary string S of length N, the task is to find the minimum number of characters required to be deleted from the string such that no subsequence of the form “0101...
Read More
Strings
Searching
subsequence
binary-string
frequency-counting
DSA
Length of longest subsequence having sum of digits of each element as a Composite Number
Given an array arr[] consisting of non-negative integers, the task is to print the length of the longest subsequence from the given array whose sum of digits of each eleme...
Read More
Arrays
Searching
Mathematical
subsequence
sieve
Prime Number
DSA
Find K that requires minimum increments or decrements of array elements to obtain a sequence of increasing powers of K
Given an array consisting of N integers, the task is to find the integer K which requires the minimum number of moves to convert the given array to a sequence of powers of...
Read More
Arrays
Mathematical
array-rearrange
DSA
LOCALTIME() function in MySQL
LOCALTIME() function in MySQL is used to check current date and time value. It returns the value of current date and time in ‘YYYY-MM-DD HH:MM:SS’ format or YYYYMMDDHHMMSS...
Read More
SQL
mysql
Length of longest subarray with product equal to a power of 2
Given an array arr[] consisting of N positive integers, the task is to find the length of the longest subarray having a product of elements of that subarray equal to a per...
Read More
Arrays
Dynamic Programming
Searching
Mathematical
subarray
Kadane
maths-power
DSA
Minimize replacements by previous or next alphabet required to make all characters of a string the same
Given a string S of length N consisting of lowercase alphabets, the task is to find the minimum number of operations required to make all the characters of the string S th...
Read More
Strings
Mathematical
DSA
Length of smallest subarray to be removed such that the remaining array is sorted
Given an array arr[] consisting of N integers, the task is to print the length of the smallest subarray to be removed from arr[] such that the remaining array is sorted.Ex...
Read More
Arrays
Greedy
Searching
Sorting
array-rearrange
subarray
DSA
Count ways to split array into K non-intersecting subsets
Given an array, arr[] of size N and an integer K, the task is to split the array into K non-intersecting subsets such that union of all the K subsets is equal to the given...
Read More
Greedy
Mathematical
Combinatorial
Permutation and Combination
DSA
Divide Matrix into K groups of adjacent cells having minimum difference between maximum and minimum sized groups
Given N rows and M columns of a matrix, the task is to fill the matrix cells using first K integers such that:Each group of cells is denoted by a single integer.The differ...
Read More
Pattern Searching
Mathematical
Matrix
School Programming
DSA
Minimize cost to convert all characters of a binary string to 0s
Given a binary string, str, two integer arrays R[], and C[] of size N. Flipping all the characters from index i to R[i] requires C[i] cost. The task is to minimize the cos...
Read More
Strings
Bit Magic
Queue
Greedy
Sorting
Mathematical
priority-queue
DSA
1
...
6909
6910
6911
...
11196