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
How to Check if a Thread Holds Lock on a Particular Object in Java?
Java language is one of the most popular languages for many years. One of the most advantageous features of java programming is Multithreading. Multithreading allows execu...
Read More
Java
Java-Multithreading
Java Programs
Picked
Minimum flips to remove any consecutive 3 0s or 1s in given Binary string
Given a binary string S consisting of N characters, the task is to find the minimum number of flips required such that there don't exist three consecutive same characters....
Read More
Strings
Bit Magic
binary-string
DSA
Lexicographically smallest string with given string as prefix
Given an array arr[] consisting of N strings and a string S if size M, the task is to find the lexicographically smallest string consisting of the string S as the prefix. ...
Read More
Strings
Trie
Greedy
Searching
Sorting
prefix
lexicographic-ordering
DSA
Find maximum element among the elements with minimum frequency in given Array
Given an array arr[] consisting of N integers, the task is to find the maximum element with the minimum frequency.Examples:Input: arr[] = {2, 2, 5, 50, 1}Output: 50Explana...
Read More
Arrays
Algorithms
Hash
HashTable
cpp-unordered_map
frequency-counting
DSA
Check if all the digits of the given number are same
Given a positive integer N, the task is to check whether all the digits of the given integer N are the same or not. If found to be true, then print Yes. Otherwise, print N...
Read More
Java
Mathematical
Competitive Programming
number-digits
School Programming
Geometric Progression
DSA
Maximize sum of path from the Root to a Leaf node in N-ary Tree
Given a generic tree consisting of N nodes, the task is to find the maximum sum of the path from the root to the leaf node.Examples:Input:Output: 12Explanation: The path s...
Read More
Tree
Mathematical
DFS
Recursion
Tree Traversals
n-ary-tree
DSA
Find the missing digit in given product of large positive integers
Given two large integers in form of strings A and B and their product also in form of string C such that one digit of the product is replaced with X, the task is to find t...
Read More
Strings
Mathematical
large-numbers
number-theory
DSA
Find an anagram of given String having different characters at corresponding indices
Given a string S consisting of N characters, the task is to find the anagram of the given string S such that the characters at the same indices are different from the orig...
Read More
Strings
Greedy
anagram
two-pointer-algorithm
DSA
Left and Right view of a Generic Tree
Given a Generic Tree consisting of N nodes, the task is to find the left and right views of the given generic Tree.Examples:Input: 1 / \ 2 3 ...
Read More
Tree
Queue
Tree Traversals
tree-level-order
DSA
Find a pair of numbers with set bit count as at most that of N and whose Bitwise XOR is N
Given a positive integer N, the task is to find the pair of integers (X, Y) such that the Bitwise XOR of X and Y is N and X * Y is maximum where the count of bits in X and...
Read More
Bit Magic
setBitCount
Greedy
Mathematical
binary-representation
Bitwise-XOR
DSA
Matrix Spiral Traversal starting from given Coordinates
Given the order of the matrix N and M, and a source location (X, Y), the task is to find all the coordinates of the matrix in order when visited in clockwise spiral order(...
Read More
Pattern Searching
Matrix
Traversal
DSA
Lexicographically smallest permutation of [1, N] based on given Binary string
Given a binary string S of size (N - 1), the task is to find the lexicographically smallest permutation P of the first N natural numbers such that for every index i, if S[...
Read More
Arrays
Strings
Greedy
Mathematical
permutation
binary-string
lexicographic-ordering
Natural Numbers
DSA
Find number formed by K times alternatively reducing X and adding Y to 0
Given three positive integers K, X, and Y, the task is to find the number formed by alternatively subtracting X and adding Y to 0 total K number of times.Examples:Input: X...
Read More
Mathematical
number-theory
DSA
How to get geographic position of a user in HTML5 ?
Introduction: In this article, we will see how can we get the geographic position of a user in HTML5.Approach: To get the geographic position of a user in HTML5, we use ge...
Read More
Web Technologies
JavaScript
Picked
HTML5
HTML
HTML-Questions
JavaScript-Questions
How to pass a parameter to an event handler or callback ?
In React, to pass a parameter to an event handler or callback simply means to execute that function or code when the event is triggered. It links the events to the respect...
Read More
Web Technologies
Picked
React-Questions
ReactJS
1
...
5794
5795
5796
...
11503