1920. Build Array from Permutation (Leetcode Easy)

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
Рекомендации по теме
Комментарии
Автор

Were you able to build all the arrays?

Algorithmist
Автор

Hey this takes O(n) space, why dont you come up with a solution that takes O(1)?

vamsishankar
Автор

In O(1) space ans array will take O(N).

SarveshGupta-buho
Автор

I just could not solve the overflow. the int just kept overflowing

chrisserrao
Автор

Pinned by Programming Live with Larry
Programming Live with Larry
5 months ago
Were you able to build all the arrays?


REPLY

Sarvesh Gupta
Sarvesh Gupta
5 months ago
In O(1) space ans array will take O(N).

1

Programming Live with Larry
REPLY

vamsi shankar
vamsi shankar
11 days ago
Hey this takes O(n) space, why dont you come up with a solution that takes O(1)?


REPLY

DeeneeKingz