Комментарии:
Thanks bro
ОтветитьNice Explanation 👍
Ответитьdoes the binary search is applicable for unsorted array ?
Ответитьamazing explanation
Ответитьvery neat and clean explanation
ОтветитьWhat an explaination Sir , hatsoff
ОтветитьPython code is giving TLE
ОтветитьThank you very much.
ОтветитьThank you sir :)
Ответитьwhat is wrong in my code
vector<int> leftmostBuildingQueries(vector<int>& heights, vector<vector<int>>& queries)
{
int n = queries.size() ;
vector<int> ans( n , -1 ) ;
for( int i = 0 ; i < n ; i++ )
{
int a = queries[i][0] ;
int b = queries[i][1] ;
for( int j = max(a,b) ; j < heights.size() ; j++ )
{
if( heights[a] <= heights[j] && heights[b] <= heights[j] )
{
ans[i] = j ;
break;
}
}
}
return ans ;
}
Amazing explanation sir ❤
Ответить