2294. Partition Array Such That Maximum Difference Is K (Leetcode Medium)

preview_player
Показать описание
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits!

#leetcode #coding #programming
Рекомендации по теме
Комментарии
Автор

Not sure why you used a map here. Just can sort the array.

hjklmn
Автор

I wasn’t able to solve this one, I was trying it with sliding window 🥲

Sandeep-zddq