Java-CSES-Seach&Sorting

Revision en1, by just_a_smallfry, 2022-07-05 10:36:08

I was trying to solve This_CSES_problem , in which i tried 2 approaches...

1) Sorted first array , then applying binary search on this array (result — TLE )

2) Applied TreeMap , and returned map.floorKey() (result — TLE )

can you help me out?

First_approach
Second_Approach
Tags java, cses

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English just_a_smallfry 2022-07-05 10:36:08 2694 Initial revision (published)