Permutation Sequence | LeetCode 60 | C++, Python

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

**** Best Books For Data Structures & Algorithms for Interviews:**********
*****************************************************************************

June LeetCoding Challenge | Problem 20 | Permutation Sequence | 20 June,
Facebook Coding Interview question,
google coding interview question,
leetcode,
Permutation Sequence,
Permutation Sequence c++,
Permutation Sequence Java,
Permutation Sequence python,
Permutation Sequence solution,
60. Permutation Sequence,

#Facebook #CodingInterview #LeetCode #JuneLeetCodingChallenge #Google #Amazon #PermutationSequence
Рекомендации по теме
Комментарии
Автор

Thanks for video, understood the concept.

ankitdoot_YT
Автор

we can use "next_permutation" function present in stl c++

justanaverageguy
Автор

please keep posting more videos..specially the ones asked in interviews..it helps a lot :)

shwetasharma
Автор

while calculating factorial, you are starting loop with 1, so fact[1] = fact[i-1] * (i+1) ==> fact[1] = 1(0!) * 2 = 2 which seems wrong?
is i am reading some thing wrong in the code ???

My mistake, I am sorry, at index 0, we are storing fact of 1 and same way for digits

gautamkumarshukla
Автор

Can someone explain me why we are doing result.size()<n-1 instead of n

miss_anonymous
Автор

Can u please tell me why did you put the last character outside the loop, because when i submit this problem on leetcode only one case i.e n=1, k=1 was not passing when i removed that last character cond. please help?

sakshamagarwal
visit shbcf.ru