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
Difference between SQL and HiveQL
1. Structured Query Language (SQL): SQL is a domain-specific language used in programming and designed for managing data held in a relational database management system al...
Read More
Computer Networks
Operating Systems
DBMS
SQL
Compiler Design
DBMS-SQL
Theory of Computation
Computer Organization & Architecture
Engineering Mathematics
Difference Between
Software Engineering
BigData
Apache
Digital Logic
Find distance between two nodes in the given Binary tree for Q queries
Given a binary tree having N nodes and weight of N-1 edges. The distance between two nodes is the sum of the weight of edges on the path between two nodes. Each query cont...
Read More
Tree
Binary Tree
Dynamic Programming
Competitive Programming
LCA
Recursion
LCA.array-range-queries
DSA
Python - Tensorflow bitwise.right_shift() method
Tensorflow bitwise.right_shift() method performs the right_shift operation on input a defined by input b and return the new constant. The operation is done on the represen...
Read More
Python
Tensorflow
Python-Tensorflow
Real time optimized KMP Algorithm for Pattern Searching
In the article, we have already discussed the KMP algorithm for pattern searching. In this article, a real-time optimized KMP algorithm is discussed. From the previous art...
Read More
Strings
Algorithms
Pattern Searching
Searching
Data Structures
DSA
XOR of elements in a given range with updates using Fenwick Tree
Given an array A[] of integers and array Q consisting of queries of the following two types:(1, L, R) : Return XOR of all elements present between indices L and R.(2, I, v...
Read More
Arrays
Bit Magic
Tree
Analysis of Algorithms
Advanced Data Structure
Competitive Programming
Binary Indexed Tree
Bitwise-XOR
Data Structures
array-range-queries
DSA
Count of nodes having odd divisors in the given subtree for Q queries
Given a N-ary Tree and Q queries where each query contains a node of the N-ary tree, the task is to count the number of nodes that have an odd number of divisors in the su...
Read More
Tree
Binary Tree
Mathematical
Hash
Competitive Programming
DFS
number-theory
Java-HashMap
DSA
PostgreSQL - DROP DATABASE
In PostgreSQL the DROP DATABASE statement is used to delete an existing database. It deletes the cataloged entries and data directory completely. It is an irreversible pro...
Read More
PostgreSQL
postgreSQL-managing-database
Query to count odd and even parity elements in subarray after XOR with K
Given an array arr[] consisting of N elements and Q queries represented by L, R, and K. The task is to print the count of odd and even parity elements in the subarray [L, ...
Read More
Arrays
Bit Magic
Algorithms
Competitive Programming
Bitwise-XOR
subarray
array-range-queries
DSA
Rust vs C++ - Will Rust Replace C++ in Future
We have seen many programming languages trending according to their functionality and popularity but languages are not meant to be used according to their popularity. We s...
Read More
GBlog
TechTips
C++
Rust
Maximum weighted edge in path between two nodes in an N-ary tree using binary lifting
Given an N-ary tree with weighted edge and Q queries where each query contains two nodes of the tree. The task is to find the maximum weighted edge in the simple path betw...
Read More
Bit Magic
Tree
Algorithms
Dynamic Programming
Competitive Programming
DFS
array-range-queries
n-ary-tree
DSA
Number of ways to paint K cells in 3 x N grid such that no P continuous columns are left unpainted
Given three integers N, P and K, the task is to find the number of ways of painting K cells of 3 x N grid such that no adjacent cells are painted and also no continuous P ...
Read More
Dynamic Programming
Combinatorial
Matrix
permutation
DSA
Python - math.asin() function
Math module contains a number of functions which is used for mathematical operations. The math.asin() function returns the arc sine value of a number. The value passed in ...
Read More
Python
Python math-library
Python math-library-functions
Permutation of given string that maximizes count of Palindromic substrings
Given a string S, the task is to find the permutation of the string such that palindromic substrings in the string are maximum.Note: There can be multiple answers for each...
Read More
Strings
Sorting
palindrome
permutation
substring
cpp-strings
DSA
Minimum circular rotations to obtain a given numeric string by avoiding a set of given strings
Given a numeric string target of length N and a set of numeric strings blocked, each of length N, the task is to find the minimum number of circular rotations required to ...
Read More
Strings
Queue
Mathematical
Competitive Programming
BFS
rotation
C++
C++ Programs
DSA
Split a binary string into K subsets minimizing sum of products of occurrences of 0 and 1
Given a binary string S, the task is to partition the sequence into K non-empty subsets such that the sum of products of occurrences of 0 and 1 for all subsets is minimum....
Read More
Strings
Bit Magic
subset
Algorithms
Dynamic Programming
Competitive Programming
binary-string
DSA
1
...
7988
7989
7990
...
11204