Find Missing And Repeating in array | Searching and Sorting | Love Babbar DSA Sheet | Amazon🔥

Опубликовано: 18 Июнь 2026
на канале: Kick The Problem
881
26

My Playlists...

Array playlist :    • Array Problems  

Linked list playlist :    • Linked list Problems  

String playlist :    • String  

Tree playlist :    • Tree  

Graph Playlist :    • Graph  

Searching and Sorting :    • Searching and Sorting  


Question link : https://practice.geeksforgeeks.org/pr...

Find Missing And Repeating
Given an unsorted array Arr of size N of positive integers. One number 'A' from set {1, 2, …N} is missing and one number 'B' occurs twice in array. Find these two numbers.

Example 1:

Input:
N = 2
Arr[] = {2, 2}
Output: 2 1
Explanation: Repeating number is 2 and
smallest positive missing number is 1.
Example 2:

Input:
N = 3
Arr[] = {1, 3, 3}
Output: 3 2
Explanation: Repeating number is 3 and
smallest positive missing number is 2.


-- #KTP​​ --
-- #Shivam_Kasaudhan --
-- #Kick_The_Problem --
-- #Coding --
-- #GeeksforGeeks --
-- #CodeForces --
-- #Codechef --
-- #Hackerrrank --
-- #Love_Babbar_DSA_Sheet --
-- #Find_Missing_And_Repeating --

Follow us on Telegram for updates : https://t.me/kicktheproblem
Follow our Page on Facebook for updates :   / kick-the-problem-110392081196215  
--------------------------------------------------------------------
Please Like, Share and Subscribe..
For more these kinds of videos ,stay tuned..
If you have doubts , put in comments box ....




#Coding,#Competitive_Programming,#Searching,#Sorting