Python Take list as an input from a user
Using the input() function in Python, we can accept the input from the user. The input() the f…
Find MSB
Problem Given an integer, N. Find a maximum integer smaller than or equal to N that is the …
How to shuffle list in Python using random.shuffle() function?
In this Python tutorial, we will discuss the different functions and methods provided by the Python…
Count subarrays with given XOR
Problem Given an array of integers, count the number of subarrays that have the XOR equal to &ls…
Delete Nodes And Return Forest
Problem Given a binary tree and a list of nodes. Return the forest after removing the given node…
Longest Consecutive Sequence in Linear time
Problem Given an array of integers. Find the length of the longest possible sequence from the ar…
Find K-th Smallest Element in BST
Problem Given a Binary Search Tree, find the k-th smallest element in the BST. Sample Input …
Find dropping point of an egg
Problem You are given a 2-D grid where each cell has a value of either 1 or -1. Each cell in the…
Nth root of M
Problem Given two integers m and n, find the value of n?m. Sample Input 2?9 Sample Ou…
Longest Substring without repeating characters
Problem Given a string, find the longest substring with unique characters Sample Input &…
Implement power function without using multiplication & division oper…
Problem Given two positive integers x and y, implement xy without using multiplication or divisi…
Modular Exponentiation in Logarithmic Time
Problem Given three integers, a, b, and p. Compute the value of (ab)%p. Sample Input a =…