Kth Largest Element in an Array | Leetcode 215 | Heaps

  Рет қаралды 12,483

Ayushi Sharma

Ayushi Sharma

Күн бұрын

Пікірлер: 54
@alwaysgrowww
@alwaysgrowww 2 жыл бұрын
Thanks for solving questions everyday. Helps a lot.
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Welcome Dhivakar, glad they are helpful 😄
@raysdev
@raysdev 10 ай бұрын
quick select has an avg TC of linear. it's worst case is quadratic. there are techniques to choose the most optimal pivot to skew it towards linear though.
@gsampath8017
@gsampath8017 2 жыл бұрын
thanks for uploading in time 😅
@Vishal_84_k
@Vishal_84_k 2 жыл бұрын
So nit & clean explaination..😊😊
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks Vishal :)
@rishav144
@rishav144 2 жыл бұрын
very crisp and nicely explained
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks Rishav 🤗
@souravroychowdhury6525
@souravroychowdhury6525 5 ай бұрын
another great explanation ! loved it .. thanks !
@AyushiSharmaDSA
@AyushiSharmaDSA 5 ай бұрын
thank you, glad you liked it :)
@aman_kumar0208
@aman_kumar0208 2 жыл бұрын
Thanks di I solved this problm but watching to see another approach
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thanks Aman :)
@ak47_ff68
@ak47_ff68 2 жыл бұрын
U don't know me but i know you and I just say i love u 😊💖 lots of love from my side keep growing ✨
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Thank you so much, love and gratitude 😊
@undefined_exception_0
@undefined_exception_0 Жыл бұрын
Why aren't we using max heap? Time Complexity of using max heap would be O(N + KlogN) which is better than O(NlogK) of min heap. Please answer ma'am.
@sandeepdeepu5052
@sandeepdeepu5052 2 жыл бұрын
Nice and clean explanation. If possible try to add some tips in every video like u said in this video "whenever we see largest,top.. We use min heap for optimal ans" . These kind of patterns will help for everyone ayushi mam😊
@lokesh2003
@lokesh2003 Жыл бұрын
hi could you make a video about your preparation to solve these problems like reading concept or Approach and how much time you take to solve?
@reenayadav8468
@reenayadav8468 2 жыл бұрын
While explaining the approach please write pseudo code. it's helps alot ..
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Sure :)
@Luke-1o1
@Luke-1o1 2 жыл бұрын
Kya 11th aur 12th ki maths zaruri Konse topics zyada focus karna chahiye i m really tensed plz reply
@Jugal214
@Jugal214 2 жыл бұрын
Nice job my lady
@priyanshusingh100
@priyanshusingh100 2 жыл бұрын
Ma'am please make video on space complexity ..
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Sure :)
@johnhammond3605
@johnhammond3605 2 жыл бұрын
Any plan to do rat in a maze question of backtracking..?
@PavanKumar26
@PavanKumar26 2 жыл бұрын
Awesome, which software you use for making notes?
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Microsoft whiteboard
@Electrocode_gk
@Electrocode_gk Жыл бұрын
hi can you pls send code for javascript same dsa min heap
@chiragbansal8129
@chiragbansal8129 2 жыл бұрын
Do you use a writing paid / ipad ? If yes , could you please mention the device
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Hi, I do not use any writing pad, I use external mouse only :)
@chiragbansal8129
@chiragbansal8129 2 жыл бұрын
@@AyushiSharmaDSA 0_0 , that's incredible ma'am . I have tried making notes that way to save them in pdf form only , but it seems I am too bad at it . Anyway , thanks for your reply ! All the best for YT !
@dailydoseofcode
@dailydoseofcode 2 жыл бұрын
would you like to share your leet code solved problem list it will help a lot
@akashyadav3211
@akashyadav3211 2 жыл бұрын
isn't it O(nlogn)?....and question says it should be done in O(n).
@gaurimandot5788
@gaurimandot5788 2 жыл бұрын
It's actually of O(n logk) but now question has made an obligation to solve in O(n) time complexity.
@akashyadav3211
@akashyadav3211 2 жыл бұрын
I am taking worst case scenario (O(nlogn)) where the kth elements is equal to the size of array. 🙂
@pycharm_boy4344
@pycharm_boy4344 2 жыл бұрын
Can we do this problem in O(n) time complexity?
@gauravkungwani
@gauravkungwani 2 жыл бұрын
yes! by using quick sort which on average takes O(n) time.
@pycharm_boy4344
@pycharm_boy4344 2 жыл бұрын
@@gauravkungwani but using quick sort technique the worst case time complexity is O(n2).
@anubhavsaha6225
@anubhavsaha6225 2 жыл бұрын
what if the array contains duplicate elements(eg - 9,3,6,2,9)?
@dhruvshah7952
@dhruvshah7952 2 жыл бұрын
good question I had the same thought, I think since we are only inserting elements strictlly > than the minimum, it should be fine. The duplicates will never be inserted into the heap and the answer will stay the same regardless.
@satwikanandchauhan
@satwikanandchauhan 2 жыл бұрын
Where should I start if I don't know about DSA ? I know only pl like java and CPP.. suggest me any platform which helps me to gain this skills.
@udaykiran2401
@udaykiran2401 2 жыл бұрын
Udemy
@bhupendersingh2604
@bhupendersingh2604 2 жыл бұрын
@@udaykiran2401 start doing questions on leetcode
@ankurdahiya1354
@ankurdahiya1354 2 жыл бұрын
Thx didi
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Welcome Ankur:)
@chinmay-thinks
@chinmay-thinks 2 жыл бұрын
if possible use time stamp it helps a lot.
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Sure Chinmay, added ✅
@chinmay-thinks
@chinmay-thinks 2 жыл бұрын
@@AyushiSharmaDSA really thankful
@amitranjan2180
@amitranjan2180 2 жыл бұрын
Thanks a lot❤‍🩹
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Welcome :)
@aniltadikamalla4236
@aniltadikamalla4236 2 жыл бұрын
Ayushi 🫶🏻🫶🏻🫶🏻 please plan for meet up in Bangalore
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Sure Anil, will definitely plan :)
@dailydoseofcode
@dailydoseofcode 2 жыл бұрын
would you like to share your leet code solved problem list it will help a lot
@AyushiSharmaDSA
@AyushiSharmaDSA 2 жыл бұрын
Sure :)
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 347 М.
Container With Most Water | Leetcode 11 | Two pointers | Day-5
21:05
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 681 М.
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 179 М.
K Closest Points to Origin 🔥| Leetcode 973 | Max-Heap | Sorting
13:23
2.6.3 Heap - Heap Sort - Heapify - Priority Queues
51:08
Abdul Bari
Рет қаралды 2,2 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН