What is wrong with this approach?

Правка en1, от strange14, 2021-11-15 15:32:43

The problem is 1557B - Moamen and k-subarrays. Here is my submission : 135732613

I am using two pointers to greedily count the already sorted sub-arrays of maximum length, and checking if it's less than k, in which case it should return YES otherwise NO.

Also, just wanted to express my gratitude for this platform where you people never hesitate to help noobs like me!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский strange14 2021-11-15 15:32:43 407 Initial revision (published)