vinaykhatri
Vinay Khatri

I am a Full Stack Developer with a Bachelor's Degree in Computer Science, who also loves to write technical articles that can help fellow developers.

Count subarrays with given XOR

Count subarrays with given XOR

Problem Given an array of integers, count the number of subarrays that have the XOR equal to &ls…

Modular Exponentiation in Logarithmic Time

Modular Exponentiation in Logarithmic Time

Problem Given three integers, a, b, and p. Compute the value of (ab)%p. Sample Input a =…

Find MSB

Find MSB

Problem Given an integer, N. Find a maximum integer smaller than or equal to N that is the …

How to Generate Random Float numbers in Python using random and uniform() functions?

How to Generate Random Float numbers in Python using random and uniform() functions?

Python comes with a built-in random module to generate random numbers. The random module provides v…

Check if directed graph is connected

Check if directed graph is connected

Problem Given a directed graph, check if it is connected or not. Sample Input Sample O…

Python Take list as an input from a user

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…

How to shuffle list in Python using random.shuffle() function?

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…

Find MSB in O(1)

Find MSB in O(1)

Problem Given an integer N, find the maximum integer smaller than or equal to N, which is a powe…

Delete Nodes And Return Forest

Delete Nodes And Return Forest

Problem Given a binary tree and a list of nodes. Return the forest after removing the given node…

Find dropping point of an egg

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…

Longest Consecutive Sequence in Linear time

Longest Consecutive Sequence in Linear time

Problem Given an array of integers. Find the length of the longest possible sequence from the ar…

Implement power function without using multiplication & division operators (Recursive Approach)

Implement power function without using multiplication & division operators (Recursive Approach)

Problem Given two positive integers x and y, implement xy without using multiplication or divisi…