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.

vinaykhatri
Vinay Khatri 27 October, 2021

In-place vs out-of-place algorithms

In-Place algorithms This is a category of the algorithms that do not consume any extra space in …

vinaykhatri
Vinay Khatri 27 October, 2021

Quicksort algorithm using Hoare’s partitioning scheme

Problem Implement QuickSort using Hoare’s partition scheme. Approach Hoare's Par…

vinaykhatri
Vinay Khatri 24 October, 2021

Find equilibrium index of the array

Problem Calculate the equilibrium index of an array of integers. The equilibrium is the index…

vinaykhatri
Vinay Khatri 24 October, 2021

Find the smallest window in an array sorting which will make the enti…

Problem Given an integer array nums, identify one continuous subarray that, if just this subarra…

vinaykhatri
Vinay Khatri 24 October, 2021

4–Sum Problem | Quadruplets with a given sum

Problem The goal is to count all the quadruplets having a target sum S. Sample Input [2,…

vinaykhatri
Vinay Khatri 24 October, 2021

Shuffle an array according to the given order of elements

Problem Given two integer arrays of the same size, arr[] and index[], reorder elements in arr[] …

vinaykhatri
Vinay Khatri 24 October, 2021

Sort an almost sorted array where only two elements are swapped

Problem How can an almost-sorted array with only two members swapped be effectively sorted? S…

vinaykhatri
Vinay Khatri 24 October, 2021

Decode an array constructed from another array

Problem There is a hidden integer array arr that consists of n non-negative integers. It was enc…

vinaykhatri
Vinay Khatri 24 October, 2021

Reverse every consecutive m-elements of a subarray

Problem Given an array, reverse every sub-array formed by consecutive m elements. Sample Inpu…

vinaykhatri
Vinay Khatri 24 October, 2021

Print all triplets that form a geometric progression

Problem Given a sorted array of distinct positive integers, print all triplets that form Geometr…

vinaykhatri
Vinay Khatri 24 October, 2021

Find maximum sum path involving elements of given arrays

Problem Given two sorted arrays, where the arrays may share some elements. Find the largest sum …

vinaykhatri
Vinay Khatri 24 October, 2021

Maximum Product Subset Problem

Problem Given array a, we have to find the maximum product possible with the subset of elements …