1569. Number of Ways to Reorder Array to Get Same BST (Leetcode Hard)

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

here we can use fermat little theorem and it will increase the time by logM factor but space used be only linear ..also can use equation ncr+ncr-1=n+1cr to solve it using dp

narolavarshil
Автор

Uff this is frustrating to figure out the formula if we don't know it beforehand. Was able to figure out the rest of the problem

rohanb
Автор

I got some intuition. Let me try it out

harshitgangwar
join shbcf.ru