Комментарии:
That's what I expected!
I already know binary search but knew that I will definitely learn something new from every video of this playlist. And guess what, I learned the improved version of binary search formula (start + (end - start) /2 ) !
Thanks a lot Kunal ❤😄
if (strs.length == 0) return new ArrayList<>();
Map<String, List<String>> ans = new HashMap<>();
for (String s : strs) {
char[] ca = s.toCharArray();
Arrays.sort(ca);
String key = String.valueOf(ca);
if (!ans.containsKey(key)) ans.put(key, new ArrayList<>());
ans.get(key).add(s);
}
return new ArrayList<>(ans.values());
You are doing a real noble work. Huge respect❤
ОтветитьWhere are the assignment qs ???for every vdeo
ОтветитьCongrats 500
Ответитьgreat vid of dsa
ОтветитьThis guy is on another level in terms of teaching method. You don't know kunal how much you are helping people learn these complex things in the easiest way possible. Thanks a lot. You deserve the world kunal.
ОтветитьU r really best👌thanku sir for helping us☺️🙏
Ответитьif u have good quality content then why are u put this course completely free?
ОтветитьWhere is discord channel link?
Ответитьthank uu
Ответитьwhat if we compare for equality with start and end also, with mid, bcz sometimes our end and start values are the ones we're looking for ???
Ответитьkeep it up man! really a good course..
ОтветитьReal coach 🙇
ОтветитьThank you so much!
ОтветитьCould you kindly direct me to where I can access the links to the questions?
ОтветитьHad Facing Time Limit Exceeded or Runtime Error At Many Binary Search Algorithms Problem but mid=start+(end-start)/2 helped me alot 🤩 Thankyou So Much Kunal
ОтветитьLegitimately what a great explanation
ОтветитьSir love you so much..❤❤❤❤ happy teacher's day to you ❤❤❤❤❤❤
ОтветитьThanks sir
ОтветитьIs it worth watching this course in 2023?
Ответитьheyy, you used while(start <= end) loop even in the order agnostics binary search code , i mean it will never enter the loop then if its decreasingly sorted
Ответитьnice!
ОтветитьDsa with kunal💥
Ответитьyou are great bro.... !
Ответитьone of the best derivation of binary search time complexity i have ever seen!
Ответитьwhere is your dyanamic programming playlist
Ответитьone of the best video, everyone teaches the same binary
but here : OMG
order agnostic/ proper dry run for time complexity
new way for finding the middle
thanks a lot
This video is awesome. Can you give this video a auto subtitle plz, my english is bad😢😢
ОтветитьThanks a lot Kunal ❤️
ОтветитьThese videos have helped me a lot this past month. Very grateful to Kunal for doing this, for helping students like us prepare for interviews. I am very eager for the upcoming videos and I hope you post them as soon as possible.
ОтветитьVery easy explanation Kunal! very excited to continue this course.
ОтветитьThank you soo much Bhaiya , I am learning first time Binary Search and trust me the concept is crystal clear 💚
Ответитьpackage BinarySearch;
public class OrderAgnosticBS{
public static void main(String[] args) {
int[] arr = {90, 89, 34, 77, 51, 89, 53, 77, 20};
int target = 34;
int ans = orderAgnostic(arr, target);
System.out.println(ans);
}
static int orderAgnostic(int[] arr, int target) {
int start = 0;
int end = arr.length - 1;
boolean isAsc = arr[start] < arr[end];
while (start <= end) {
int mid = start + (end - start) / 2;
if (arr[mid] == target) {
return mid;
}
if (isAsc) {
if (target < arr[mid]) {
end = mid - 1;
} else {
start = mid + 1;
}
} else {
if (target > arr[mid]) {
end = mid - 1;
} else {
start = mid + 1;
}
}
}
return -1;
}
}
Check my code please im getting -1 as output which is incorrect
MORE ON FEED.
ОтветитьThank you Very much Kunal❤
Ответитьhe said he will complete this playlist in 2 months... hmmmmm.... almost two years now.. lol
Ответитьyou doing really good sir
Ответитьwhat is my arr[start] == arr[end]
ОтветитьRespect for youu bro
ОтветитьNice Cap🤠
Ответитьwhy don't you ever smile ?
Ответить