NeetCode
NeetCode
  • 355
  • 52 339 297
The LeetCode Fallacy
🚀 neetcode.io/ - A better way to prepare for coding interviews
Checkout my second Channel: www.youtube.com/@NeetCodeIO
🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/
📷 Instagram: neetcodeio
🥷 Discord: discord.gg/ddjKRXPqtk
🐦 Twitter: neetcode1
🎵 TikTok: www.tiktok.com/@neetcode.io
"Sappheiros - Fading" is under a Creative Commons license (CC BY 3.0) / czcams.com/users/Sappheiros
Music promoted by BreakingCopyright: czcams.com/video/uhqMKpppnpo/video.html
#coding #neetcode #python
zhlédnutí: 403 873

Video

Most Common Concepts for Coding Interviews
zhlédnutí 271KPřed 7 měsíci
The fastest way to prepare for coding interviews: prioritize the most common data structures and algorithms. 🚀 neetcode.io/ - Get lifetime access to every course I ever create! Checkout my second Channel: www.youtube.com/@NeetCodeIO 🌎 neetcode.io/roadmap - Coding Interview Roadmap 📃 neetcode.io/practice - Neetcode 150 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🥷 Discord: discord...
Leetcode 24 Hour Challenge (while learning Golang)
zhlédnutí 118KPřed 8 měsíci
Coding leetcode problems for 24 hours straight because I enjoy the pain. And I get to learn about Golang, which is such a great language for leetcoding. 🚀 neetcode.io/ - A better way to prepare for coding interviews Checkout my second Channel for daily uploads: www.youtube.com/@NeetCodeIO 🧑‍💼 Connect on LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🥷 Discord: discord.gg/ddjKRXPqtk 🐦 Tw...
I quit Amazon after two months
zhlédnutí 563KPřed 8 měsíci
Sharing my story of working at Amazon and being unemployed for over a year. 🚀 neetcode.io/ - A better way to prepare for coding interviews. Checkout my second Channel for daily uploads: www.youtube.com/@NeetCodeIO 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🥷 Discord: discord.gg/ddjKRXPqtk 🐦 Twitter: neetcode1 📷 Instagram: neetcodeio 0:00 - Intro 0:36 -...
I coded a Leetcode clone (it's easier than you think)
zhlédnutí 135KPřed 9 měsíci
I coded a leetcode clone (an online code judge application, not literally a leetcode clone). I walk through how I did it, including the backend, frontend, and the process of executing test cases. 🚀 neetcode.io/ - Get lifetime access to every course I ever create! Checkout my second Channel: www.youtube.com/@NeetCodeIO 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🐦 Twitter: twitter...
Google's Tech Stack (6 internal tools revealed)
zhlédnutí 300KPřed 9 měsíci
Google's internal tech stack is mostly public and we talk about 6 of the most influential infrastructure tools used at google, either currently or in the past. 🚀 neetcode.io/ - A better way to prepare for coding interviews 📝 neetcode.io/courses/lessons/design-youtube - CZcams Skeleton Design Doc MongoDB Cheat sheet: neetcode.io/courses/lessons/mongodb MongoDB Atlas - tinyurl.com/kae79pew Tools ...
My Last Day at Google
zhlédnutí 548KPřed 11 měsíci
I left Google earlier this year, after working there for about 1.5 years as a software engineer. 🚀 neetcode.io/ - A better way to prepare for coding interviews! Checkout my second Channel: @NeetCodeIO 🥷 Discord: discord.gg/ddjKRXPqtk 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🐦 Twitter: neetcode1 📷 Instagram: neetcodeio 🎵 TikTok: www.tiktok.com/@neetco...
My Brain after 569 Leetcode Problems
zhlédnutí 2,4MPřed rokem
🗺️ Roadmap: neetcode.io In this video I wanted to share every single thing I learned from solving and explaining hundreds of leetcode problems. Quiz Feature: neetcode.io/ 🚀 neetcode.io/ - A better way to prepare for coding interviews! Second channel: @NeetCodeIO 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🥷 Discord: discord.gg/ddjKRXPqtk 🐦 Twitter: neetcode1 📷 Instagr...
GPT-4 is OVERHYPED
zhlédnutí 117KPřed rokem
🚀 neetcode.io/ - A better way to prepare for coding interviews! Checkout my second Channel: @NeetCodeIO 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🥷 Discord: discord.gg/ddjKRXPqtk 🐦 Twitter: neetcode1 📷 Instagram: neetcodeio 🎵 TikTok: www.tiktok.com/@neetcode.io #coding #neetcode #python
20 System Design Concepts Explained in 10 Minutes
zhlédnutí 863KPřed rokem
🚀 neetcode.io/ - A better way to prepare for coding interviews! A brief overview of 20 system design concepts for system design interviews. Checkout my second Channel: @NeetCodeIO 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🥷 Discord: discord.gg/ddjKRXPqtk 🐦 Twitter: neetcode1 📷 Instagram: neetcodeio 🎵 TikTok: www.tiktok.com/@neetcode.io 0:00 - Intro 0:...
Google will DESTROY ChatGPT in 2023
zhlédnutí 217KPřed rokem
🚀 neetcode.io/ - A better way to prepare for coding interviews! Meet Bard - Google's answer to ChatGPT and Microsofts new changes to bing and edge. Will this AI war between tech giants lead to faster automation of jobs? Let's discuss. 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🥷 Discord: discord.gg/ddjKRXPqtk 🐦 Twitter: neetcode1 📷 Instagram: neetcodeio...
8 Design Patterns EVERY Developer Should Know
zhlédnutí 997KPřed rokem
🚀 neetcode.io/ - A better way to prepare for coding interviews! Checkout my second Channel: @NeetCodeIO While some object oriented design patterns are a bit outdated, it's important for every software engineer to understand the most important ones. I cover several of my favorite ones in this video. Code from video: neetcode.io/courses/lessons/8-design-patterns 🧑‍💼 LinkedIn: www.linkedin.com/in/...
Technologies I'm Learning in 2023
zhlédnutí 165KPřed rokem
🚀 neetcode.io/ - Get lifetime access to every course I ever create! The technologies I'm planning on learning next year. I feel like some parts of this came off a bit rushed / confusing, so let me know if you have questions. Checkout my second Channel: @NeetCodeIO 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🥷 Discord: discord.gg/ddjKRXPqtk 🐦 Twitter: neetcode1 📷 Insta...
The BEST Coding Interview Roadmap in 2023 (free)
zhlédnutí 371KPřed rokem
🚀 neetcode.io/ - Checkout the FREE roadmap! Checkout my second Channel: @NeetCodeIO 🧑‍💼 LinkedIn: www.linkedin.com/in/navdeep-singh-3aaa14161/ 🥷 Discord: discord.gg/ddjKRXPqtk 🐦 Twitter: neetcode1 📷 Instagram: neetcodeio 🎵 TikTok: www.tiktok.com/@neetcode.io #leetcode #roadmap #coding
Will AI replace programmers?
zhlédnutí 177KPřed rokem
Will AI replace programmers?
Design Youtube - System Design Interview
zhlédnutí 250KPřed rokem
Design CZcams - System Design Interview
Is FAANG dead?
zhlédnutí 115KPřed rokem
Is FAANG dead?
Design Twitter - System Design Interview
zhlédnutí 450KPřed rokem
Design Twitter - System Design Interview
Mock Google Coding Interview with a Meta Intern
zhlédnutí 876KPřed rokem
Mock Google Coding Interview with a Meta Intern
Tech Layoffs & Hiring Freezes
zhlédnutí 337KPřed rokem
Tech Layoffs & Hiring Freezes
Anatomy of a Production App - System Design
zhlédnutí 110KPřed rokem
Anatomy of a Production App - System Design
Big-O Notation - For Coding Interviews
zhlédnutí 400KPřed rokem
Big-O Notation - For Coding Interviews
Python for Coding Interviews - Everything you need to Know
zhlédnutí 377KPřed rokem
Python for Coding Interviews - Everything you need to Know
Dynamic Programming 2D - Full Course - Python
zhlédnutí 100KPřed rokem
Dynamic Programming 2D - Full Course - Python
Dynamic Programming 1D - Full Course - Python
zhlédnutí 227KPřed rokem
Dynamic Programming 1D - Full Course - Python
Maximum Performance of a Team - Leetcode 1383 - Python
zhlédnutí 28KPřed rokem
Maximum Performance of a Team - Leetcode 1383 - Python
Construct String from Binary Tree - Leetcode 606 - Python
zhlédnutí 32KPřed rokem
Construct String from Binary Tree - Leetcode 606 - Python
How I Coded a SaaS (payments, database and frontend)
zhlédnutí 135KPřed rokem
How I Coded a SaaS (payments, database and frontend)
Count Vowels Permutation - Dynamic Programming - Leetcode 1220 - Python
zhlédnutí 40KPřed rokem
Count Vowels Permutation - Dynamic Programming - Leetcode 1220 - Python
Tech Stack I use at Google as a Software Engineer
zhlédnutí 408KPřed rokem
Tech Stack I use at Google as a Software Engineer

Komentáře

  • @rafaelbnn
    @rafaelbnn Před hodinou

    4:00 another way to look at it is to see that ALL the solutions that have a 1 will be in the first branch. That way you don't need to check again in the branch that starts with 2

  • @aadityakiran_s
    @aadityakiran_s Před hodinou

    Got asked a harder variation of this in a Google interview. No real hint was also provided by the interviewer. I suppose luck is also a factor. If you've seen the problem before or if you're able to fit whatever problem, you get into the pattern that you've seen before.

  • @sahilsharma2518
    @sahilsharma2518 Před 4 hodinami

    This is awesome, solution I tried without using left & right pointer approach `def maxProfit(self, prices: List[int]) -> int: min_price = float('inf') max_profit = 0 for price in prices: min_price = min(min_price, price) profit = price - min_price max_profit = max(max_profit, profit) return max_profit`

  • @biro2200
    @biro2200 Před 7 hodinami

    On the profile picture updating async, you could always solve that by referencing a latest.png and then only updating the object store to change latest.png to reference to the newest image and hence the changes would propagate much faster than updating 1000x video documents

  • @saisurisetti6278
    @saisurisetti6278 Před 8 hodinami

    “And of course everyone’s favourite: Dynamic programming”

  • @shiveshgupta1705
    @shiveshgupta1705 Před 8 hodinami

    You always explain such this it is one of the best explanation🤩

  • @AtherionGG
    @AtherionGG Před 9 hodinami

    This is the most vague problem I have seen on NC and LC. I have a solution but since not much is said about the decoder other than it's a string, I'll assume this is valid. The problem with using any sort of delimiter is determined on the constraints. In neetcode it says any utf-8 character is valid. In leetcode it has simplified the problem for any ascii character. The harder problem of any utf-8 character in neetcode, you could write a test case to break it with any normal character like ':', it is all banking on obscurity or not commonly used. For this reason I don't think the video provides a valid solution. So based on the constraints, one solution is to convert the string into utf-16 and then I used '\xFFFF' as the delimiter, since it is outside of utf-8. Then in the decode split on '\xFFFF' then convert the strings back to utf-8.

  • @WorkAccountTalha
    @WorkAccountTalha Před 10 hodinami

    beautiful drawing and great explanation!!!!!!

  • @imainjett8904
    @imainjett8904 Před 10 hodinami

    Simple solution in Java🙂⬇ class Solution { List<Integer> indexes = new ArrayList<>(); public String encode(List<String> strs) { StringBuilder stringsCombined = new StringBuilder(); for(String word : strs ) { stringsCombined.append(word); indexes.add(stringsCombined.length()); } return stringsCombined.toString(); } public List<String> decode(String str) { int previousIndex = 0; List<String> answer = new ArrayList<>(); for(int index : indexes) { String word = str.substring(previousIndex, index); answer.add(word); previousIndex = index; } return answer; } }

  • @sneakyblinder982
    @sneakyblinder982 Před 11 hodinami

    Thanks!

  • @ossyahn
    @ossyahn Před 11 hodinami

    I just solved this question in neetcode but I'm not sure this is actually a correct solution in all cases. Maybe I'm missing something, but what happens if we have an array like [9, 2, 3, 10, 4, 7]? In that case the best solution would be to pick 9, 10, and 7, jumping over both 2 and 3. I'm not sure this solution would pick up those houses. This is what I came up with (in C#): public class Solution { public int Rob(int[] nums) { var accum = new int[] {0, 0, 0}; for (int i = nums.Length - 1; i >= 0; i--) { var curr = nums[i] + Math.Max(accum[1], accum[2]); accum[2] = accum[1]; accum[1] = accum[0]; accum[0] = curr; } return Math.Max(accum[0], accum[1]); } }

  • @Somens8Dworld
    @Somens8Dworld Před 12 hodinami

    fk it word1=word2

  • @the-real-dr2050
    @the-real-dr2050 Před 12 hodinami

    It’s a reasonable story. I had a similar experience at Meta but there was nothing to point at that was wrong so it took me 3.5 years to quit. Sigh. Thanks for sharing.

  • @the-real-dr2050
    @the-real-dr2050 Před 12 hodinami

    Amen

  • @imerence6290
    @imerence6290 Před 12 hodinami

    This shit does not make sense bruh. I'm cooked.

  • @narsimhareddy7224
    @narsimhareddy7224 Před 13 hodinami

    i did the trie for the matrix instead of given words lol

  • @neilmurphy7594
    @neilmurphy7594 Před 13 hodinami

    @NeetCode What are you using for a tablet/whiteboarding software?

  • @talkativekrishna2310
    @talkativekrishna2310 Před 13 hodinami

    Why creation of adjacency list take O(n.m.m) when it is O(n.m). The operation adj[pattern].append(word) should be in O(1) time right?

  • @EranM
    @EranM Před 14 hodinami

    using a stack is over kill.. just travel inorder, and set k = k - 1. When k == 0 it's the correct value

  • @stylisgames
    @stylisgames Před 14 hodinami

    See I was solving this problem on the actual neetcode website which does not have the hint about each node in the stack having a minimum value. That hint was all I needed, I actually solved it on my own with that! Would be great if the site included any hints that are on Leetcode.

  • @bilalmohammad4242
    @bilalmohammad4242 Před 15 hodinami

    I love you man! ❤ Keep up the great work

  • @MehmetDemir-xi3yy
    @MehmetDemir-xi3yy Před 18 hodinami

    I am sorry but Time complexity looks wrong because you have n selection in each step because you do not increment index. In subset problem we have 2^n because we increment index even if we dont choose current element

  • @LUN-bo2fb
    @LUN-bo2fb Před 18 hodinami

    Perhaps he will fail on behavior interview... he's disrespectful to the interviewer, which is a big bad sign. Words come too quick from his mouth.

  • @amanimagdi150
    @amanimagdi150 Před 21 hodinou

    perfect solution and illustration, thanks so much

  • @NallaSanjayReddy
    @NallaSanjayReddy Před 21 hodinou

    what if we come to know that 0 is child of 6 at the end

  • @Techgether
    @Techgether Před 22 hodinami

    having 2 while loop in this case == O(n²) time?

  • @sahajpatel2749
    @sahajpatel2749 Před dnem

    it isn't intuitive, if you have to forcefully apply binary search, given you have the optimal time complexity known.

  • @user-gk3iq3lm7t
    @user-gk3iq3lm7t Před dnem

    u only need to care if indexes before value 0 can get pass it or not

  • @user-cb1si7ig6p
    @user-cb1si7ig6p Před dnem

    Thanks! Wonderful explanation

  • @user-hp3ii3id9h
    @user-hp3ii3id9h Před dnem

    A possible way to solve the TLE issue is using a dict to store the count of flight ticket. It aviods the list insertion operation which is O(n). The main logic reminds the same. class Solution: def findItinerary(self, tickets: List[List[str]]) -> List[str]: adjList = {} self.ticketSize = len(tickets) path = [] for pair in tickets: start = pair[0] dest = pair[1] if start not in adjList: adjList[start] = {dest:1} else: if dest not in adjList[start]: adjList[start][dest] = 1 else: adjList[start][dest] += 1 for key in adjList: adjList[key] = dict(sorted(adjList[key].items(), key=lambda item: item[0])) def traverse(cur): if self.ticketSize == 0: return True elif cur not in adjList: return False for nextStop in adjList[cur].keys(): if adjList[cur][nextStop] > 0: adjList[cur][nextStop] -= 1 self.ticketSize -= 1 path.append(nextStop) if travese(nextStop): return True adjList[cur][nextStop] += 1 self.ticketSize += 1 path.pop(-1) return False path.append("JFK") travese("JFK") return path

  • @otea-app
    @otea-app Před dnem

    aw < 3

  • @Darkmatterkun
    @Darkmatterkun Před dnem

    what is the time complexity for this solution?

  • @vangelis_tr6132
    @vangelis_tr6132 Před dnem

    i dont understand the "if dp[amount] != amount + 1 else return -1". Why is this if statement valid?

  • @shaikadam1828
    @shaikadam1828 Před dnem

    dude i got an approach before but i wasn't sure of its implementation when i saw urs it's not totally same but the iteration part was missing in my approach now i got that thx dude appreciated it

  • @user-gg1jr2hj5o
    @user-gg1jr2hj5o Před dnem

    How does this solution take into account the fact that |n - m| <= 1 ?

  • @ashishkarn9283
    @ashishkarn9283 Před dnem

    public int missingNumber(int[] nums) { int xor = nums.length; for(int i=0;i<nums.length;i++){ xor ^= i; xor ^= nums[i]; } return xor; }

  • @NabeelFarooqui
    @NabeelFarooqui Před dnem

    Easy 🤡

  • @SOMESHKHANDELIA
    @SOMESHKHANDELIA Před dnem

    Why is both "visit" and "output" required? One of them should be enough right?

  • @CodingWorld202
    @CodingWorld202 Před dnem

    everyone at first talking about market. Sad reality but

  • @kocot.
    @kocot. Před dnem

    well, the hiring didn't pick up since then... :D But doing leetcode for fun is a much better reason than doing it just to get a job :P Especially since a mediocre problem base for doing the actual interviews... :D

  • @kocot.
    @kocot. Před dnem

    Instead of optimizing it with cache, I've got an almost identical result (1300ms->50ms) by simply ensuring you don't process subsequent stars. So if there is a*a*a*, you'd only check it once. Now the cache seems obvious, but that addressed directly the most compute intensive cases :) Funny to see how it's same efficient. Using both would probably improve it even further.

  • @r.varshitha7459
    @r.varshitha7459 Před dnem

    You don't need to check the condition res==MAX//10 && digit>=MAX%10 cause this would mean that the input should be 7463847412 ( reverse of 2147483647). This is outside the int range as in the question they mentioned the input is an integer. Similarly you also can avoid the res==MIN//10 && digit<=MIN%10 condition .

  • @danish6192
    @danish6192 Před dnem

    so Mr. Beast was a software engineer so amazed by youtube architecture that he started youtubing

  • @yunusemreozvarlik2906

    I think returning -1 and making 2 + left + right makes it more complicated or at least for me. The below is working perfectly fine as well. def dfs(root: Optional[TreeNode]) -> int: if not root: return 0 left = dfs(root.left) right = dfs(root.right) result[0] = max(result[0], left + right) return 1 + max(left, right)

  • @Bryan-zo6ng
    @Bryan-zo6ng Před 2 dny

    Can we all agree coding interviews are a form of hazing?

  • @willcoomans9674
    @willcoomans9674 Před 2 dny

    what is the space complexity?