Тёмный

Merge in Between Linked Lists - Leetcode 1669 - Python 

NeetCodeIO
Подписаться 154 тыс.
Просмотров 8 тыс.
50% 1

🚀 neetcode.io/ - A better way to prepare for Coding Interviews
🧑‍💼 LinkedIn: / navdeep-singh-3aaa14161
🐦 Twitter: / neetcode1
⭐ BLIND-75 PLAYLIST: • Two Sum - Leetcode 1 -...
Problem Link: leetcode.com/problems/merge-i...
0:00 - Read the problem
0:30 - Drawing Explanation
2:40 - Coding Explanation
leetcode 1669
#neetcode #leetcode #python

Опубликовано:

 

26 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@TannerBarcelos
@TannerBarcelos 4 месяца назад
Pictures / diagramming literally helps get us 80% of the way there. Intuitively, just by drawing out the problem, we can easily transfer much of the idea / logic to code. Awesome video. This reinvigorated some confidence I’ve been sorely lacking to get back into leetcode
@jayjw1
@jayjw1 4 месяца назад
THIS WAS THE FIRST MEDIUM DAILY PROBLEM THAT I WAS ABLE TO DO ENTIRELY ON MY OWN FIRST TRY WITHIN 10 MINUTES!!!! All of my learning/studying has been greatly helped by you NeetCode. Appreciate you and hopefully I'll be at my dream FAANG job soon :D
@satyamjha68
@satyamjha68 4 месяца назад
Solved it just now and got the notification of your video as well ! Plus this question was made easy also because of constraints which washes some edges cases away like imagine a to be at beginning of linked list in that case we would have to change our head to list2 and return that.
@chrischika7026
@chrischika7026 4 месяца назад
thats even easier
@satyamjha68
@satyamjha68 4 месяца назад
@@chrischika7026 agreed that's also easy but it still is an edge case to consider.
@amirarshiamirzaei710
@amirarshiamirzaei710 4 месяца назад
Great video this one those question you beg to get in interview if you're good at drawing the problam it'll become much simpler and there is no edge case to worry about
@pastori2672
@pastori2672 4 месяца назад
for real this one took me less then 5min the picture helped
@alfrieghtsnalam7507
@alfrieghtsnalam7507 4 месяца назад
what tool are you using to write in there in the videos please share thanks just want to know
@GreenRhino12
@GreenRhino12 4 месяца назад
Please solve leetcode 744 it’s so confusing for me as a beginner
@asagiai4965
@asagiai4965 4 месяца назад
Wait how is 744 confusing? Didn't it just mean return the next letter higher than the target?
@austingoh2373
@austingoh2373 4 месяца назад
Question is just asking us to return the first letter that is lexicographically larger than the target. Given that the list is in non-decreasing order (already sorted), you can be confident that the first letter you find is the first letter lexicographically larger than the target. Code: def nextGreatestLetter(self, letters: List[str], target: str) -> str: for c in letters: if c > target: return c return letters[0] This has a time complexity of O(n), relatively efficient and will pass all the text cases. Personally beat 93.23%. But if you want to make it even more efficient, you can run a binary search, for a time complexity of O(logn).
@ombhamare623
@ombhamare623 4 месяца назад
Noice