Infosys SP OA problem (Over)

Правка en2, от 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 ?

Теги #online assessment

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский CPharderthanDarkSouls 2022-07-29 11:52:25 78
en1 Английский CPharderthanDarkSouls 2022-07-29 11:49:49 318 Initial revision (published)