special array with x elements greater than or equal x leetcode | leetcode 1608 | array

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


#Array #Special #Elements #special_array_with_x_elements_greater_than_or_equal_x #LeetCode #Problem1608 #Easy #Coding #Programming #Interview #Practice #DataStructure #Algorithm #Java #Preparation #NG #nickode #cct #cook_code_travel
Рекомендации по теме
Комментарии
Автор

Can you explain the 2nd solution also using binary search?

rishabhsaxena
Автор

Thank you sir! Your video was very helpful to me!

servantofthelord
Автор

What an awesome way to solve this question.Many thanks!!!!

utpalborgohain
Автор

Excellent, I think the only comment is the second for loop can go only uptill the length of the array

abirax
Автор

Binary search wala v explain kra dijiye sir!

agyaani
Автор

u just know the solution but u cant explain it

sarveshjoshi
Автор

Thanks! I thought hard about solving this problem on my own. I came up with (a) sort the array (b) compare all elements starting from index 0 for nums[i] >= length of array - i

Not as good as O(n)

Sorry, I had not finished watching till the end. You also mention a similar solution. Appreciate all the information!

ashishm
visit shbcf.ru