Only Repeating From 1 To n-1
Last Updated :
19 Apr, 2025
Given an array arr[] of size n filled with numbers from 1 to n-1 in random order. The array has only one repetitive element. The task is to find the repetitive element.
Examples:
Input: arr[] = [1, 3, 2, 3, 4]
Output: 3
Explanation: The number 3 is the only repeating element.
Input: arr[] = [1, 5, 1, 2, 3, 4]
Output: 1
Explanation: The number 1 is the only repeating element.
[Naive Approach] Using Nested Loop- O(n^2) Time and O(1) Space
The idea is to use two nested loops. The outer loop traverses through all elements and the inner loop check if the element picked by the outer loop appears anywhere else.
C++
// C++ program to find the
// duplicate element
#include <iostream>
#include <vector>
using namespace std;
// Function to find the dupicate
// element in an array
int findDuplicate(vector<int>& arr) {
int n = arr.size();
// Find the duplicate element
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] == arr[j])
return arr[i];
}
}
return -1;
}
int main() {
vector<int> arr = {1, 3, 2, 3, 4};
cout << findDuplicate(arr);
return 0;
}
Java
// Java program to find the
// duplicate element
class GfG {
// Function to find the duplicate
// element in an array
static int findDuplicate(int[] arr) {
int n = arr.length;
// Find the duplicate element
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] == arr[j])
return arr[i];
}
}
return -1;
}
public static void main(String[] args) {
int[] arr = {1, 3, 2, 3, 4};
System.out.println(findDuplicate(arr));
}
}
Python
# Python program to find the
# duplicate element
# Function to find the duplicate
# element in an array
def findDuplicate(arr):
n = len(arr)
# Find the duplicate element
for i in range(n):
for j in range(i + 1, n):
if arr[i] == arr[j]:
return arr[i]
return -1
if __name__ == "__main__":
arr = [1, 3, 2, 3, 4]
print(findDuplicate(arr))
C#
// C# program to find the
// duplicate element
using System;
class GfG {
// Function to find the duplicate
// element in an array
static int findDuplicate(int[] arr) {
int n = arr.Length;
// Find the duplicate element
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] == arr[j])
return arr[i];
}
}
return -1;
}
public static void Main(string[] args) {
int[] arr = {1, 3, 2, 3, 4};
Console.WriteLine(findDuplicate(arr));
}
}
JavaScript
// JavaScript program to find the
// duplicate element
// Function to find the duplicate
// element in an array
function findDuplicate(arr) {
const n = arr.length;
// Find the duplicate element
for (let i = 0; i < n; i++) {
for (let j = i + 1; j < n; j++) {
if (arr[i] === arr[j])
return arr[i];
}
}
return -1;
}
// Driver code
const arr = [1, 3, 2, 3, 4];
console.log(findDuplicate(arr));
[Better Approach 1] Sorting - O(n Log n) Time and O(1) Space
The idea is to sort the given input array and traverse it. If value of the ith element is equal to i+1, then the current element is repetitive as value of elements is between 1 and N-1 and every element appears only once except one element.
C++
// C++ Program to find the
// duplicate element
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int findDuplicate(vector<int>& arr) {
// Sort the array
sort(arr.begin(), arr.end());
for (int i = 0; i < arr.size() - 1; i++) {
// If the adjacent elements are equal
if (arr[i] == arr[i + 1]) {
return arr[i];
}
}
return -1;
}
int main() {
vector<int> arr = {1, 3, 2, 3, 4};
cout << findDuplicate(arr);
return 0;
}
Java
// Java Program to find the
// duplicate element
import java.util.Arrays;
class GfG {
static int findDuplicate(int[] arr) {
// Sort the array
Arrays.sort(arr);
for (int i = 0; i < arr.length - 1; i++) {
// If the adjacent elements are equal
if (arr[i] == arr[i + 1]) {
return arr[i];
}
}
return -1;
}
public static void main(String[] args) {
int[] arr = {1, 3, 2, 3, 4};
System.out.println(findDuplicate(arr));
}
}
Python
# Python Program to find the
# duplicate element
def findDuplicate(arr):
# Sort the array
arr.sort()
for i in range(len(arr) - 1):
# If the adjacent elements are equal
if arr[i] == arr[i + 1]:
return arr[i]
return -1
if __name__ == "__main__":
arr = [1, 3, 2, 3, 4]
print(findDuplicate(arr))
C#
// C# Program to find the
// duplicate element
using System;
class GfG {
static int findDuplicate(int[] arr) {
// Sort the array
Array.Sort(arr);
for (int i = 0; i < arr.Length - 1; i++) {
// If the adjacent elements are equal
if (arr[i] == arr[i + 1]) {
return arr[i];
}
}
return -1;
}
public static void Main(string[] args) {
int[] arr = {1, 3, 2, 3, 4};
Console.WriteLine(findDuplicate(arr));
}
}
JavaScript
// JavaScript Program to find the
// duplicate element
function findDuplicate(arr) {
// Sort the array
arr.sort((a, b) => a - b);
for (let i = 0; i < arr.length - 1; i++) {
// If the adjacent elements are equal
if (arr[i] === arr[i + 1]) {
return arr[i];
}
}
return -1;
}
// Driver Code
const arr = [1, 3, 2, 3, 4];
console.log(findDuplicate(arr));
[Better Approach 2] Hash Set - O(n) Time and O(n) Space
Use a HastSet to store elements visited. If an already visited element appears again, return it.
C++
// C++ Program to find the
// duplicate element
#include <iostream>
#include <vector>
#include <unordered_set>
using namespace std;
int findDuplicate(vector<int>& arr) {
// Create an unordered_set
unordered_set<int> s;
for (int x : arr) {
// If the element is already in the set
if (s.find(x) != s.end())
return x;
s.insert(x);
}
return -1;
}
int main() {
vector<int> arr = {1, 3, 2, 3, 4};
cout << findDuplicate(arr);
return 0;
}
Java
// Java Program to find the
// duplicate element
import java.util.HashSet;
class GfG {
// Function to find the duplicate element
static int findDuplicate(int[] arr) {
// Create a HashSet
HashSet<Integer> set = new HashSet<>();
for (int x : arr) {
// If the element is already in the set
if (set.contains(x))
return x;
set.add(x);
}
return -1;
}
public static void main(String[] args) {
int[] arr = {1, 3, 2, 3, 4};
System.out.println(findDuplicate(arr));
}
}
Python
# Python Program to find the
# duplicate element
# Function to find the duplicate element
def findDuplicate(arr):
# Create a set
s = set()
for x in arr:
# If the element is already in the set
if x in s:
return x
s.add(x)
return -1
if __name__ == "__main__":
arr = [1, 3, 2, 3, 4]
print(findDuplicate(arr))
C#
// C# Program to find the
// duplicate element
using System;
using System.Collections.Generic;
class GfG {
// Function to find the duplicate element
static int FindDuplicate(int[] arr) {
// Create a HashSet
HashSet<int> set = new HashSet<int>();
foreach (int x in arr) {
// If the element is already in the set
if (set.Contains(x))
return x;
set.Add(x);
}
return -1;
}
static void Main(string[] args) {
int[] arr = {1, 3, 2, 3, 4};
Console.WriteLine(FindDuplicate(arr));
}
}
JavaScript
// JavaScript Program to find the
// duplicate element
// Function to find the duplicate element
function findDuplicate(arr) {
// Create a Set
let set = new Set();
for (let x of arr) {
// If the element is already in the set
if (set.has(x))
return x;
set.add(x);
}
return -1;
}
// Driver function
let arr = [1, 3, 2, 3, 4];
console.log(findDuplicate(arr));
We know sum of first n-1 natural numbers is (N - 1)*N/2. We compute sum of array elements and subtract natural number sum from it to find the only missing element.
C++
// C++ program to find the
// duplicate element
#include <iostream>
#include <vector>
#include <numeric>
using namespace std;
int findDuplicate(vector<int>& arr) {
long long n = arr.size();
// Find the sum of elements in the array
// and subtract the sum of the first n-1
// natural numbers to find the repeating element.
long long sum = accumulate(arr.begin(), arr.end(), 0);
int duplicate = sum - ((n - 1) * n / 2);
return duplicate;
}
int main() {
vector<int> arr = {1, 3, 2, 3, 4};
cout << findDuplicate(arr);
return 0;
}
Java
// Java program to find the
// duplicate element
class GfG {
static int findDuplicate(int[] arr) {
int n = arr.length;
// Use long to avoid overflow
long sum = 0;
for (int num : arr) {
sum += num;
}
// Expected sum of numbers from 1 to n-1
long expectedSum = (long)(n - 1) * (n - 1 + 1) / 2;
return (int)(sum - expectedSum);
}
public static void main(String[] args) {
int[] arr = {1, 3, 2, 3, 4};
System.out.println(findDuplicate(arr));
}
}
Python
# Python program to find the duplicate element
def findDuplicate(arr):
n = len(arr)
# Find the sum of elements in the array
# and subtract the sum of the first n-1
# natural numbers to find the repeating element.
totalSum = sum(arr)
duplicate = totalSum - ((n - 1) * n // 2)
return duplicate
if __name__ == "__main__":
arr = [1, 3, 2, 3, 4]
print(findDuplicate(arr))
C#
// C# program to find the
// duplicate element
using System;
class GfG {
static int findDuplicate(int[] arr) {
int n = arr.Length;
// Find the sum of elements in the array
// and subtract the sum of the first n-1
// natural numbers to find the repeating element.
int sum = 0;
foreach (int num in arr) {
sum += num;
}
int duplicate = sum - ((n - 1) * n / 2);
return duplicate;
}
static void Main(string[] args) {
int[] arr = {1, 3, 2, 3, 4};
Console.WriteLine(findDuplicate(arr));
}
}
JavaScript
// JavaScript program to find the
// duplicate element
function findDuplicate(arr) {
let n = arr.length;
// Find the sum of elements in the array
// and subtract the sum of the first n-1
// natural numbers to find the repeating element.
let sum = arr.reduce((acc, num) => acc + num, 0);
let duplicate = sum - ((n - 1) * n / 2);
return duplicate;
}
// Driver code
let arr = [1, 3, 2, 3, 4];
console.log(findDuplicate(arr));
[Expected Approach 2] Using XOR - O(n) Time and O(1) Space
The idea is based on the facts that x ^ x = 0 and if x ^ y = z then x ^ z = y. To find the duplicate element first find XOR of elements from 1 to n-1 and elements of array. XOR of these two would be our result.
C++
// C++ program to find the
// duplicate element
#include <iostream>
#include <vector>
using namespace std;
// Function to find the dupicate
// element in an array
int findDuplicate(vector<int>& arr) {
int n = arr.size();
int res = 0;
// XOR all numbers from 1 to n-1 and
// elements in the array
for (int i = 0; i < n - 1; i++) {
res = res ^ (i + 1) ^ arr[i];
}
// XOR the last element in the array
res = res ^ arr[n - 1];
return res;
}
int main() {
vector<int> arr = {1, 3, 2, 3, 4};
cout << findDuplicate(arr);
return 0;
}
Java
// Java program to find the
// duplicate element
class GfG {
// Function to find the duplicate
// element in an array
static int findDuplicate(int[] arr) {
int n = arr.length;
int res = 0;
// XOR all numbers from 1 to n-1 and
// elements in the array
for (int i = 0; i < n - 1; i++) {
res = res ^ (i + 1) ^ arr[i];
}
// XOR the last element in the array
res = res ^ arr[n - 1];
return res;
}
public static void main(String[] args) {
int[] arr = {1, 3, 2, 3, 4};
System.out.println(findDuplicate(arr));
}
}
Python
# Python program to find the
# duplicate element
# Function to find the duplicate
# element in an array
def findDuplicate(arr):
n = len(arr)
res = 0
# XOR all numbers from 1 to n-1 and
# elements in the array
for i in range(n - 1):
res = res ^ (i + 1) ^ arr[i]
# XOR the last element in the array
res = res ^ arr[n - 1]
return res
if __name__ == "__main__":
arr = [1, 3, 2, 3, 4]
print(findDuplicate(arr))
C#
// C# program to find the
// duplicate element
using System;
class GfG {
// Function to find the duplicate
// element in an array
static int findDuplicate(int[] arr) {
int n = arr.Length;
int res = 0;
// XOR all numbers from 1 to n-1 and
// elements in the array
for (int i = 0; i < n - 1; i++) {
res = res ^ (i + 1) ^ arr[i];
}
// XOR the last element in the array
res = res ^ arr[n - 1];
return res;
}
static void Main(string[] args) {
int[] arr = {1, 3, 2, 3, 4};
Console.WriteLine(findDuplicate(arr));
}
}
JavaScript
// JavaScript program to find the
// duplicate element
// Function to find the duplicate
// element in an array
function findDuplicate(arr) {
let n = arr.length;
let res = 0;
// XOR all numbers from 1 to n-1 and
// elements in the array
for (let i = 0; i < n - 1; i++) {
res = res ^ (i + 1) ^ arr[i];
}
// XOR the last element in the array
res = res ^ arr[n - 1];
return res;
}
// Driver code
let arr = [1, 3, 2, 3, 4];
console.log(findDuplicate(arr));
[Expected Approach 3] Using Elements as Indexes - O(n) Time and O(1) Space
As there are only positive numbers, so visit the index equal to the current element and make it negative. If an index value is already negative, then it means that current element is repeated.
C++
#include <iostream>
#include <vector>
using namespace std;
// Function to find the dupicate
// element in an array
int findDuplicate(vector<int>& arr) {
for (int i = 0; i < arr.size(); i++) {
if (arr[abs(arr[i])] < 0) {
return abs(arr[i]);
}
arr[abs(arr[i])] = -arr[abs(arr[i])];
}
return -1;
}
int main() {
vector<int> arr = {1, 3, 2, 3, 4};
cout << findDuplicate(arr);
return 0;
}
Java
class GfG {
// Function to find the duplicate
// element in an array
static int findDuplicate(int[] arr) {
for (int i = 0; i < arr.length; i++) {
if (arr[Math.abs(arr[i])] < 0) {
return Math.abs(arr[i]);
}
arr[Math.abs(arr[i])] = -arr[Math.abs(arr[i])];
}
return -1;
}
public static void main(String[] args) {
int[] arr = {1, 3, 2, 3, 4};
System.out.println(findDuplicate(arr));
}
}
Python
# Function to find the duplicate
# element in an array
def findDuplicate(arr):
for i in range(len(arr)):
if arr[abs(arr[i])] < 0:
return abs(arr[i])
arr[abs(arr[i])] = -arr[abs(arr[i])]
return -1
if __name__ == "__main__":
arr = [1, 3, 2, 3, 4]
print(findDuplicate(arr))
C#
using System;
class GfG {
// Function to find the duplicate
// element in an array
static int findDuplicate(int[] arr) {
for (int i = 0; i < arr.Length; i++) {
if (arr[Math.Abs(arr[i])] < 0) {
return Math.Abs(arr[i]);
}
arr[Math.Abs(arr[i])] = -arr[Math.Abs(arr[i])];
}
return -1;
}
static void Main(string[] args) {
int[] arr = {1, 3, 2, 3, 4};
Console.WriteLine(findDuplicate(arr));
}
}
JavaScript
// Function to find the duplicate
// element in an array
function findDuplicate(arr) {
for (let i = 0; i < arr.length; i++) {
if (arr[Math.abs(arr[i])] < 0) {
return Math.abs(arr[i]);
}
arr[Math.abs(arr[i])] = -arr[Math.abs(arr[i])];
}
return -1;
}
// Driver Code
let arr = [1, 3, 2, 3, 4];
console.log(findDuplicate(arr));
[Expected Approach 4] Floyd's Cycle Detection - O(n) Time and O(1) Space
Floyd's Cycle Detection Algorithm is used to detect whether the list or array has cycle or duplicate elements or not. In this approach, there are two pointers the fast and the slow. The fast one goes forward two steps each time, while the slow one goes only step each time and they meet the same item when slow==fast. In fact, they meet in a circle, the duplicate number must be the entry point of the circle when visiting the array from array[0].
Next we just need to find the entry point. We use a point (we can use the fast one before) to visit from the beginning with one step each time, do the same job to slow. When fast == slow, they meet at the entry point of the circle.
Note: Please refer remove loop from a linked list for proof of this method
C++
// C++ program to find the
// duplicate element
#include <iostream>
#include <vector>
using namespace std;
// Function to find the dupicate
// element in an array
int findDuplicate(vector<int>& arr) {
// slow pointer
int slow = arr[0];
// fast pointer
int fast = arr[0];
do {
// moves one step
slow = arr[slow];
// moves two steps
fast = arr[arr[fast]];
} while (slow != fast);
// reinitialize fast to the start
fast = arr[0];
// Loop until both pointers meet at the duplicate
while (slow != fast) {
slow = arr[slow];
fast = arr[fast];
}
// Return duplicate number
return slow;
}
int main() {
vector<int> arr = {1, 3, 2, 3, 4};
cout << findDuplicate(arr);
return 0;
}
Java
// Java program to find the
// duplicate element
class GfG {
// Function to find the duplicate
// element in an array
static int findDuplicate(int[] arr) {
// slow pointer
int slow = arr[0];
// fast pointer
int fast = arr[0];
do {
// moves one step
slow = arr[slow];
// moves two steps
fast = arr[arr[fast]];
} while (slow != fast);
// reinitialize fast to the start
fast = arr[0];
// Loop until both pointers meet at the duplicate
while (slow != fast) {
slow = arr[slow];
fast = arr[fast];
}
// Return duplicate number
return slow;
}
public static void main(String[] args) {
int[] arr = {1, 3, 2, 3, 4};
System.out.println(findDuplicate(arr));
}
}
Python
# Python program to find the
# duplicate element
# Function to find the duplicate
# element in an array
def findDuplicate(arr):
# slow pointer
slow = arr[0]
# fast pointer
fast = arr[0]
while True:
# moves one step
slow = arr[slow]
# moves two steps
fast = arr[arr[fast]]
if slow == fast:
break
# reinitialize fast to the start
fast = arr[0]
# Loop until both pointers meet at the duplicate
while slow != fast:
slow = arr[slow]
fast = arr[fast]
# Return duplicate number
return slow
if __name__ == "__main__":
arr = [1, 3, 2, 3, 4]
print(findDuplicate(arr))
C#
// C# program to find the
// duplicate element
using System;
class GfG {
// Function to find the duplicate
// element in an array
static int findDuplicate(int[] arr) {
// slow pointer
int slow = arr[0];
// fast pointer
int fast = arr[0];
do {
// moves one step
slow = arr[slow];
// moves two steps
fast = arr[arr[fast]];
} while (slow != fast);
// reinitialize fast to the start
fast = arr[0];
// Loop until both pointers meet at the duplicate
while (slow != fast) {
slow = arr[slow];
fast = arr[fast];
}
// Return duplicate number
return slow;
}
static void Main(string[] args) {
int[] arr = {1, 3, 2, 3, 4};
Console.WriteLine(findDuplicate(arr));
}
}
JavaScript
// JavaScript program to find the
// duplicate element
// Function to find the duplicate
// element in an array
function findDuplicate(arr) {
// slow pointer
let slow = arr[0];
// fast pointer
let fast = arr[0];
do {
// moves one step
slow = arr[slow];
// moves two steps
fast = arr[arr[fast]];
} while (slow !== fast);
// reinitialize fast to the start
fast = arr[0];
// Loop until both pointers meet at the duplicate
while (slow !== fast) {
slow = arr[slow];
fast = arr[fast];
}
// Return duplicate number
return slow;
}
// Driver Code
let arr = [1, 3, 2, 3, 4];
console.log(findDuplicate(arr));
Similar Reads
Basics & Prerequisites
Data Structures
Array Data StructureIn this article, we introduce array, implementation in different popular languages, its basic operations and commonly seen problems / interview questions. An array stores items (in case of C/C++ and Java Primitive Arrays) or their references (in case of Python, JS, Java Non-Primitive) at contiguous
3 min read
String in Data StructureA string is a sequence of characters. The following facts make string an interesting data structure.Small set of elements. Unlike normal array, strings typically have smaller set of items. For example, lowercase English alphabet has only 26 characters. ASCII has only 256 characters.Strings are immut
2 min read
Hashing in Data StructureHashing is a technique used in data structures that efficiently stores and retrieves data in a way that allows for quick access. Hashing involves mapping data to a specific index in a hash table (an array of items) using a hash function. It enables fast retrieval of information based on its key. The
2 min read
Linked List Data StructureA linked list is a fundamental data structure in computer science. It mainly allows efficient insertion and deletion operations compared to arrays. Like arrays, it is also used to implement other data structures like stack, queue and deque. Hereâs the comparison of Linked List vs Arrays Linked List:
2 min read
Stack Data StructureA Stack is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). LIFO implies that the element that is inserted last, comes out first and FILO implies that the element that is inserted first
2 min read
Queue Data StructureA Queue Data Structure is a fundamental concept in computer science used for storing and managing data in a specific order. It follows the principle of "First in, First out" (FIFO), where the first element added to the queue is the first one to be removed. It is used as a buffer in computer systems
2 min read
Tree Data StructureTree Data Structure is a non-linear data structure in which a collection of elements known as nodes are connected to each other via edges such that there exists exactly one path between any two nodes. Types of TreeBinary Tree : Every node has at most two childrenTernary Tree : Every node has at most
4 min read
Graph Data StructureGraph Data Structure is a collection of nodes connected by edges. It's used to represent relationships between different entities. If you are looking for topic-wise list of problems on different topics like DFS, BFS, Topological Sort, Shortest Path, etc., please refer to Graph Algorithms. Basics of
3 min read
Trie Data StructureThe Trie data structure is a tree-like structure used for storing a dynamic set of strings. It allows for efficient retrieval and storage of keys, making it highly effective in handling large datasets. Trie supports operations such as insertion, search, deletion of keys, and prefix searches. In this
15+ min read
Algorithms
Searching AlgorithmsSearching algorithms are essential tools in computer science used to locate specific items within a collection of data. In this tutorial, we are mainly going to focus upon searching in an array. When we search an item in an array, there are two most common algorithms used based on the type of input
2 min read
Sorting AlgorithmsA Sorting Algorithm is used to rearrange a given array or list of elements in an order. For example, a given array [10, 20, 5, 2] becomes [2, 5, 10, 20] after sorting in increasing order and becomes [20, 10, 5, 2] after sorting in decreasing order. There exist different sorting algorithms for differ
3 min read
Introduction to RecursionThe process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called a recursive function. A recursive algorithm takes one step toward solution and then recursively call itself to further move. The algorithm stops once we reach the solution
14 min read
Greedy AlgorithmsGreedy algorithms are a class of algorithms that make locally optimal choices at each step with the hope of finding a global optimum solution. At every step of the algorithm, we make a choice that looks the best at the moment. To make the choice, we sometimes sort the array so that we can always get
3 min read
Graph AlgorithmsGraph is a non-linear data structure like tree data structure. The limitation of tree is, it can only represent hierarchical data. For situations where nodes or vertices are randomly connected with each other other, we use Graph. Example situations where we use graph data structure are, a social net
3 min read
Dynamic Programming or DPDynamic Programming is an algorithmic technique with the following properties.It is mainly an optimization over plain recursion. Wherever we see a recursive solution that has repeated calls for the same inputs, we can optimize it using Dynamic Programming. The idea is to simply store the results of
3 min read
Bitwise AlgorithmsBitwise algorithms in Data Structures and Algorithms (DSA) involve manipulating individual bits of binary representations of numbers to perform operations efficiently. These algorithms utilize bitwise operators like AND, OR, XOR, NOT, Left Shift, and Right Shift.BasicsIntroduction to Bitwise Algorit
4 min read
Advanced
Segment TreeSegment Tree is a data structure that allows efficient querying and updating of intervals or segments of an array. It is particularly useful for problems involving range queries, such as finding the sum, minimum, maximum, or any other operation over a specific range of elements in an array. The tree
3 min read
Pattern SearchingPattern searching algorithms are essential tools in computer science and data processing. These algorithms are designed to efficiently find a particular pattern within a larger set of data. Patten SearchingImportant Pattern Searching Algorithms:Naive String Matching : A Simple Algorithm that works i
2 min read
GeometryGeometry is a branch of mathematics that studies the properties, measurements, and relationships of points, lines, angles, surfaces, and solids. From basic lines and angles to complex structures, it helps us understand the world around us.Geometry for Students and BeginnersThis section covers key br
2 min read
Interview Preparation
Practice Problem