LeetCode 56 Merge Intervals in javascript

preview_player
Показать описание

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

Beautiful solution.

For anyone else confused with 'current' assignment,

// current variable holds the last element that is present in the result array.
// assigning to current, changes the value it points to.
// however, modifying current indexes will modify the last value it's pointing at.

ghanashrim