Infosys SP OA problem (Over)

Revision en2, by CPharderthanDarkSouls, 2022-07-29 11:52:25

You are given an array , can perform two operations -if the size is greater than 1 choose two distinct elements and remove both of them -or remove a single element N — 10^5 , 1 <= arr[i] <= 10^9 Find the minimum operations to make array empty. TC — N=5, arr -> 1,2,2,3,5 Output -> 3 Explanation -> (1,2) (2,3) 5

What will be the approach of this ?

Tags #online assessment

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English CPharderthanDarkSouls 2022-07-29 11:52:25 78
en1 English CPharderthanDarkSouls 2022-07-29 11:49:49 318 Initial revision (published)