DATA STRUCTURE


vinaykhatri
Vinay Khatri 27 November, 2021

Implement power function without using multiplication and division op…

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

vinaykhatri
Vinay Khatri 27 November, 2021

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…

vinaykhatri
Vinay Khatri 27 November, 2021

Implement power function without using multiplication & division oper…

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

vinaykhatri
Vinay Khatri 27 November, 2021

Delete Nodes And Return Forest

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

vinaykhatri
Vinay Khatri 27 November, 2021

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…

vinaykhatri
Vinay Khatri 27 November, 2021

Modular Exponentiation in Logarithmic Time

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

vinaykhatri
Vinay Khatri 27 November, 2021

Count subarrays with given XOR

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

vinaykhatri
Vinay Khatri 27 November, 2021

Longest Consecutive Sequence in Linear time

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

vinaykhatri
Vinay Khatri 26 November, 2021

Find the closest pair from two arrays

Problem Given two sorted arrays and an integer X, find one number from each array such that the …

vinaykhatri
Vinay Khatri 26 November, 2021

Find two numbers with maximum sum formed by array digits

Problem Given an integer array having digits between 0 and 9, find two numbers with maximum sum …

vinaykhatri
Vinay Khatri 26 November, 2021

Find all symmetric pairs in an array of pairs

Problem Given an array of pairs, find all symmetric pairs in it. Symmetric pairs are two pairs (…

vinaykhatri
Vinay Khatri 26 November, 2021

Find the count of distinct elements in every subarray of size k

Problem Given an array of integers and a number k. Find the count of distinct elements in every …