DATA STRUCTURE


vinaykhatri
Vinay Khatri 26 December, 2021

Mountain Array

Problem Given an array of integers, check if it is a mountain array or not. An array is called a…

vinaykhatri
Vinay Khatri 13 December, 2021

What is Pseudocode? Pseudocode Examples

If you are new to programming and starting your journey by learning a new programming language. You…

vinaykhatri
Vinay Khatri 10 December, 2021

Count triplets which form an inversion in an array

Problem Given an array, you need to count all inversion triplets. Inversion triplets are such th…

vinaykhatri
Vinay Khatri 4 December, 2021

Introduction to Star Schema in Data Warehouse Modeling

A data warehouse (DW), also known as a computing data warehouse, is a type of data management syste…

vinaykhatri
Vinay Khatri 27 November, 2021

Nth root of M

Problem Given two integers m and n, find the value of n?m. Sample Input 2?9 Sample Ou…

vinaykhatri
Vinay Khatri 27 November, 2021

Find K-th Smallest Element in BST

Problem Given a Binary Search Tree, find the k-th smallest element in the BST. Sample Input …

vinaykhatri
Vinay Khatri 27 November, 2021

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…

vinaykhatri
Vinay Khatri 27 November, 2021

Find MSB in O(1)

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

vinaykhatri
Vinay Khatri 27 November, 2021

Find MSB

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

vinaykhatri
Vinay Khatri 27 November, 2021

How to Generate Random Float numbers in Python using random and unifo…

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

vinaykhatri
Vinay Khatri 27 November, 2021

Check if directed graph is connected

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

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…