×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

Interview Problems on Array

A collection of 43 posts

Interview Problems on Array

Car Pooling Problem

In this article, we have explored the Car Pooling Problem in depth and presented an efficient approach to solve it using the concept of Prefix Sum.

Anuj Dharme
Algorithms

2 queues in a single array

In this article, we have presented 2 different approaches to implement 2 Queue Data Structure using a single Array Data Structure.

Gabriel
Interview Problems on Array

Maximum consecutive ones when at most k zeros can be flipped

In this article, we have explored algorithms to Find the longest sequence of consecutive ones when at most k zeros can be altered to 1. This involve techniques like Sliding Window approach.

Kartheesh Reddy Koripelli
Interview Problems on Array

MEX (minimum excluded) of a sequence (with updates)

In this article, we have explored approaches to find the MEX (minimum excluded) of a sequence (with updates) efficiently with pre-computation.

Ue Kiao, PhD Ue Kiao, PhD
Algorithms

K-th smallest element of two sorted arrays

In this article, we have explored algorithms to find the K-th smallest element of two sorted arrays. This involve the idea of Binary Search.

Gaduputi Thanusree
Data Structures

Array Data Structure

In this article, we have explored Array Data Structure in depth. We explore key ideas in Array and how we develop our own custom implementation of Array along with different Array operations.

Ue Kiao, PhD Ue Kiao, PhD
Algorithms

Dutch National Flag Problem

In this article, we have explored the Dutch National Flag Problem which is a standard Algorithmic Problem proposed by Edsger Dijkstra. It is solved efficiently using Three Way Partitioning technique.

Shubhankar Maurya Shubhankar Maurya
Algorithms

Three Way Partitioning

In this article, we have explored Three Way Partitioning technique which is used in Three Partition Quicksort and Dutch National Flag Algorithm.

Aravind Mohandas Aravind Mohandas
Algorithms

Union of Two Arrays

In this article, we have explained different approaches to find Union of Two Arrays and provided implementations in C++, Java and Python.

Susmita Bhattacharya
Algorithms

3 Sum Smaller Problem

The 3 sum smaller problem is an interesting algorithm problem that we shall be solving in this article. This is an extension of the 3 Sum Problem. In this, we have to select 3 different elements from an array such that the sum is less than a target.

Thompson Mina
Algorithms

4 Array Sum equal to Zero (4Sum II)

In this article, we have explored insightful approaches / algorithms to find elements in 4 arrays whose sum is equal to zero. This is an extension of 4 SUM PROBLEM.

Rohan Chandrashekar Rohan Chandrashekar
Algorithms

2 Sum Closest: Find 2 elements with sum closest to target

We have explained how to solve the 2 Sum Closest problem that is Find 2 elements with sum closest to a target efficiently. We have explained 3 different approaches which involves the use of Binary Search and Two Pointer technique.

Joe Gorst Joe Gorst
Algorithms

4 Sum problem

In this article, we have explored an insightful approach/ algorithm to find the 4 elements in an array whose sum is equal to the required answer (4 Sum problem). This concept finds many uses in computational geometry.

Rohan Chandrashekar Rohan Chandrashekar
Algorithms

Implement K stacks in one array

In this article, we have present two approaches to design K stacks in one array. The challenge is to efficiently store the elements to use all available space in the array and maintain the time complexity of stack operations.

Vikram Shishupalsingh Bais Vikram Shishupalsingh Bais
Algorithms

Closest 3 Sum problem (Find all triplets close to the given sum)

In this article, we have explored an insightful approach/ algorithm to find the 3 elements in an array whose sum is equal to or close to the required answer. This is an extension of the 3 Sum problem where the resulting sum needed not be exact.

Rohan Chandrashekar Rohan Chandrashekar
Algorithms

Intersection of two arrays

We have explored several approaches to find Intersection of two arrays efficiently. This involve techniques like sorting, binary search, hash map and much more.

Akanksha Singh
Algorithms

Find Peak Element in an Array

We have explained the problem of finding Peak Element in an Array along with different approaches to solve it efficiently.

Fahd Agodzo Mohammed Fahd Agodzo Mohammed
Algorithms

Majority Element in an array

We have discussed algorithmic techniques to find the majority element in an array. The brute force algorithm takes O(N^2) time while the most efficient algorithm can do it in O(N) time.

Tushti
Time Complexity

Time Complexity of Dynamic Array

We have explained Complexity Analysis of Dynamic Array along with Time and Space Complexity of different operations of Dynamic Array.

Ue Kiao, PhD Ue Kiao, PhD
Time Complexity

Time Complexity Analysis of Array

We have presented the Time Complexity analysis of different operations in Array. It clears several misconceptions such that Time Complexity to access i-th element takes O(1) time but in reality, it takes O(√N) time. We have presented space complexity of array operations as well.

Ue Kiao, PhD Ue Kiao, PhD
Algorithms

Two Pointer Technique in Array

We have explained the Two Pointer Technique in array which is used to solve a vast range of problems efficiently. Problems include Reversing an array and Find if a pair with given sum exists in a sorted array.

Tushti
Algorithms

Block Swap Algorithm [for Array Rotation]

This article discusses Block Swap Algorithm. It is used to rotate an array by any number of positions with a Time Complexity of O(N) and Space Complexity of O(1).

Tushti
Algorithms

Move even number to front of array

We have explained two efficient approaches to Move even number to front of array using Hoare's Partition and Lomuto Partition.

Naveen Singla
Algorithms

Lomuto Partition Scheme

We have explained the Lomuto partition scheme, which is used in the famous Quicksort algorithm. It is an algorithm to partition an array into two parts based on a given condition.

Vansh Pratap Singh Vansh Pratap Singh
Algorithms

Reversal Algorithm to rotate an array

We have discussed Reversal algorithm. It is widely used for rotating arrays. This algorithm is specifically useful for rotating array by any number of places because it efficiently does the operation in O(N) time and O(1) auxiliary space.

Tushti
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship