- 355
- 51 420 012
NeetCode
United States
Приєднався 28 тра 2020
Current NEET and ex-Google SWE, also I love teaching!
N.E.E.T. = (Not in education, employment or training)
Preparing for coding interviews? Checkout neetcode.io
N.E.E.T. = (Not in education, employment or training)
Preparing for coding interviews? Checkout neetcode.io
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) / ua-cam.com/users/Sappheiros
Music promoted by BreakingCopyright: ua-cam.com/video/uhqMKpppnpo/v-deo.html
#coding #neetcode #python
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) / ua-cam.com/users/Sappheiros
Music promoted by BreakingCopyright: ua-cam.com/video/uhqMKpppnpo/v-deo.html
#coding #neetcode #python
Переглядів: 363 323
Відео
Most Common Concepts for Coding Interviews
Переглядів 262 тис.7 місяців тому
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)
Переглядів 115 тис.7 місяців тому
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
Переглядів 555 тис.7 місяців тому
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)
Переглядів 134 тис.8 місяців тому
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)
Переглядів 300 тис.9 місяців тому
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 - UA-cam Skeleton Design Doc MongoDB Cheat sheet: neetcode.io/courses/lessons/mongodb MongoDB Atlas - tinyurl.com/kae79pew Tools ...
My Last Day at Google
Переглядів 546 тис.11 місяців тому
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
Переглядів 2,4 млнРік тому
🗺️ 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
Переглядів 116 тис.Рік тому
🚀 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
Переглядів 840 тис.Рік тому
🚀 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
Переглядів 217 тис.Рік тому
🚀 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
Переглядів 977 тис.Рік тому
🚀 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
Переглядів 165 тис.Рік тому
🚀 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)
Переглядів 367 тис.Рік тому
🚀 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
Design Youtube - System Design Interview
Переглядів 241 тис.Рік тому
Design UA-cam - System Design Interview
Design Twitter - System Design Interview
Переглядів 443 тис.Рік тому
Design Twitter - System Design Interview
Mock Google Coding Interview with a Meta Intern
Переглядів 850 тис.Рік тому
Mock Google Coding Interview with a Meta Intern
Anatomy of a Production App - System Design
Переглядів 109 тис.Рік тому
Anatomy of a Production App - System Design
Big-O Notation - For Coding Interviews
Переглядів 387 тис.Рік тому
Big-O Notation - For Coding Interviews
Python for Coding Interviews - Everything you need to Know
Переглядів 365 тис.Рік тому
Python for Coding Interviews - Everything you need to Know
Dynamic Programming 2D - Full Course - Python
Переглядів 99 тис.Рік тому
Dynamic Programming 2D - Full Course - Python
Dynamic Programming 1D - Full Course - Python
Переглядів 224 тис.Рік тому
Dynamic Programming 1D - Full Course - Python
Maximum Performance of a Team - Leetcode 1383 - Python
Переглядів 28 тис.Рік тому
Maximum Performance of a Team - Leetcode 1383 - Python
Construct String from Binary Tree - Leetcode 606 - Python
Переглядів 32 тис.Рік тому
Construct String from Binary Tree - Leetcode 606 - Python
How I Coded a SaaS (payments, database and frontend)
Переглядів 135 тис.Рік тому
How I Coded a SaaS (payments, database and frontend)
Count Vowels Permutation - Dynamic Programming - Leetcode 1220 - Python
Переглядів 40 тис.Рік тому
Count Vowels Permutation - Dynamic Programming - Leetcode 1220 - Python
Tech Stack I use at Google as a Software Engineer
Переглядів 408 тис.Рік тому
Tech Stack I use at Google as a Software Engineer
even though I am watching this video, still can't get it..
Hi bro.. do u have the solution to "Best time to buy and sell stock III"... I am in dire need of it!!... The other solutions in the internet are totally going above my head!!
U a God
Can you share the solution for "688. Knight Probability in Chessboard " using dp
This is wrinkling my brain.
After doing a few of these challenges, coding feels like tricks to manipulate stuff to get what you want. So different from other subjects
acid compliance😅
This code throws an error. You can't append to a int.
How come this O (n) complexity? there are two internal loops. For an example: for nums = [8,7,6 ,5, 4, 3, 2, 1] could be worst case time complexity scenario ie o(n^2)
So at 25 y.o, now I get how multiplication is done.This proves the whole education system is fucked.
Nice solution i used a hash map instead
yea everything you told was fine..except you gotta know that Java handles the user input in a more efficient way than the other 2
wouldnt it be easier to have a left array and a right array. Left contains the products of all elements left of that element except itself. Same goes for the right. leftArray = [1,1,2,6] rightArray = [24,12,4,1]. Then just multiply each corresponding element of leftArray to the rightArray to get outpur array = [24,12,8,6]
Thanks!
For the first problem, I guess the only optimization (beyond knowing the math eq) would be selecting the smaller of m and n, so that your memory complexity is minimized.
why my first thought is tying to write the dictionary mapper from letter to number.....
Please do more SQL 🙏
Can we improve the efficiency at 2:24:28 by mutating wordDict into the form where the key is len(word) and the value is a list of all words of that length (no extra space). Then we can check: for key in wordDict: if i+key in dp and dp[i + key] = True: for word in wordDict[key]: #check the word That way, you eliminate the vast majority of building dp.
2:08:59 why is the third value in the min necessary (just n). cur_max can never be less than 1. If cur_max is 1, its the same as n, if its larger, it's bigger than n.
var checkInclusion = function(s1, s2) { if (s2.length<s1.length) return false; let map1 = makeHashmap(s1, 0, s1.length); let map2 = makeHashmap(s2, 0, s1.length); let matches = 0; for (let [key, val] of map1.entries()) { if(map2.get(key) == val) matches++; } if(matches == map1.size) return true; for (let i = 1; i < s2.length-s1.length+1; i++) { let oldVal = s2[i-1]; let newVal = s2[i+s1.length-1]; if (map1.has(oldVal)) { if(map2.get(oldVal) === map1.get(oldVal)) matches--; map2.set(oldVal, map2.get(oldVal) - 1); if(map2.get(oldVal) === map1.get(oldVal)) matches++; } if (map1.has(newVal)) { if(map2.get(newVal) === map1.get(newVal)) matches--; map2.set(newVal, (map2.has(newVal) ? map2.get(newVal) : 0) + 1) if(map2.get(newVal) === map1.get(newVal)) matches++; } if(matches === map1.size) return true; } return false; }; var makeHashmap = function(string, start, end) { const hash = new Map(); for(let i = start; i < end; i++){ hash.set(string[i], (hash.has(string[i]) ? hash.get(string[i]) : 0) + 1) } return hash }
Very good video!!! Thanks!
thank you it is very helpful🤩🤩🤩
BFS , More intuitive solution class Solution(object): def canFinish(self, numCourses, prerequisites): """ :type numCourses: int :type prerequisites: List[List[int]] :rtype: bool """ graph = defaultdict(list) in_degree = [0] * numCourses for course, prereq in prerequisites: graph[prereq].append(course) in_degree[course] += 1 # Step 2: Initialize the queue with courses having in-degree of 0 queue = deque([i for i in range(numCourses) if in_degree[i] == 0]) # Step 3: Process the courses using BFS processed_courses = 0 while queue: current_course = queue.popleft() processed_courses += 1 # Reduce the in-degree of neighboring courses for neighbor in graph[current_course]: in_degree[neighbor] -= 1 # If in-degree becomes 0, add it to the queue if in_degree[neighbor] == 0: queue.append(neighbor) # Step 4: Check if all courses are processed return processed_courses == numCourses
does the goat respond
Thank you right man right your explanation right is very right clear right but I wish right you use right the word of "right" right less right.
I don't think you can say O(log26) for the maxHeap, since it's not just one appearance per letter, it is task.length < 10^4, so there could be 10^4 pops * idle queue
It’s actually possible to construct the adjacency list in linear time. First create a set of the word list, then for every char in every word try all the letters from the alphabet and check if it’s in the set. If it is then add it to the adjacency list for that word. Great video!
I finally understand it! Thank you!
Hi Neet, loved the solution- it was very concise and simple. One thing I would add to the explanation is that you made it seem like it was a breadth first solution instead of a depth first solution inside your diagram segment. The for-loop executes after each backtracking return, not when they are called. In other words, the next iteration of the for loop is only executed after the first completed string.
after seeing the thumbnail i thought its a fireship video
I kept waiting for him to actually describe the work and the process of how he got disengaged at Amazon. Seems like he was more eager to talk about his drug use. Becoming a great software engineer takes a lot of dedication, focus, and stamina. Forget the drugs and learn to really dig writing code.
Farmers daily life is far mor excited and spontaneous than CS these days, and the gains enough to feed a big family alone.With modern tech farming is not tough like it was a the hell. I know this.Farming is more usefull too and more ethical than CS, and more freedom adn social interactions, i know that!
I thought i might not work in some scenario, but seem i am wrong.
Java Code without causing a Time limit Exceeded in Leetcode class Solution { public List<String> findItinerary(List<List<String>> tickets) { LinkedList<String> iternary = new LinkedList<>(); Map<String,PriorityQueue<String>> graph = new HashMap<>(); Stack<String> stack = new Stack<>(); stack.push("JFK"); for(List<String> ticket : tickets){ graph.computeIfAbsent(ticket.get(0), k->new PriorityQueue<String>()); graph.get(ticket.get(0)).add(ticket.get(1)); } while(!stack.isEmpty()){ String destination = stack.peek(); if(!graph.getOrDefault(destination, new PriorityQueue<String>()).isEmpty()){ stack.push(graph.get(destination).poll()); } else{ iternary.addFirst(stack.pop()); } } return iternary; } }
yoy desreve 10M followers . Your explanation is simply superb
wow. simply fkn wow with the pos diag neg diag.. such a nice pattern to this.. holy moly. neet! 1337!!
brilliant!!!!
literally this is insaneeee
I still don't get why does (self.isSameTree(p.left, q.left)) works. Could someone explain a bit?
Could someone explain a little bit what does 0 and 1 in "balanced = left[0] and right [0] and abs(left[1] - right[1] <= 1)" mean?
Guys you can solve this problem using hash set very easily
Similar events happened to me at the level of detail that it is uncanny (and at around the same time 2018-2019ish.) I actually started my CS journey after the darker paranoia stuff. Funny how we both ended up on LeetCode at the end of the day. Cheers to you friend for sharing your story. Time for me to lock in and do some LeetCode!
Dogg, I have been waiting for someone to explain the learning process using analogy to ML models--it's something I think about a lot, it seems *so* many people just have no idea how to teach themselves anything, how to think about learning itself, and a lot could really benefit from recognizing it is a fairly predictable process that need not generate any anxiety at all. People talk about banging their head against the wall for hours trying to figure a single problem out, and I just feel bad for them. I never, ever do that, and yet always (eventually) succeed at learning anything I want to--because I understand that it simply isn't necessary, any more than a neural network learning how to, say, complete a trackmania level *needs* to reach the finish line every single iteration--the whole point is to fail repeatedly with incremental improvement. Waste no time beating yourself up over something you don't know, just note "okay there's still a gap there" and move on. Come back to it later armed with a little more surrounding knowledge. Explore, approach the topic from multiple angles, pursue points of personal curiosity that provide precious motivation--as long as you continue processing relevant information, *your understanding of a topic WILL eventually gel into a functional model without ever needing to look complete at any point earlier along the way!*. That could be worded much more clearly but I don't feel like it right now. However, by making this one attempt to verbalize this concept now, I am certain I have made incremental progress toward being capable of explaining it very articulately in the future. No stress!
import java.util.*; class Solution { public int maxSubArray(int[] nums) { int sum=nums[0]; int max=Integer.MIN_VALUE; max=Math.max(max,sum); if(sum<0) sum=0; for(int i=1;i<nums.length;i++){ sum+=nums[i]; max=Math.max(max,sum); if(sum<0) sum=0; } return max; } }
Once the logic explanation was done...code looks easy peasy Great work.
Liked immediately after seeing Naruto reference
def numDecodings(self, s: str) -> int: if s[0] == '0': return 0 n = len(s) dp = [0] * (n + 1) dp[0], dp[1] = 1, 1 for i in range(2, n + 1): one = int(s[i - 1]) two = int(s[i - 2:i]) if 1 <= one <= 9: dp[i] += dp[i - 1] if 10 <= two <= 26: dp[i] += dp[i - 2] return dp[n] this is more like understandable dp tbh
Great explanation, with ur explanation feeling like it was so easy. Thank u so much
Why can't I just reverse the list using slicing? I'm still pretty new to coding, but it seems hella easier to just type out head[::-1] and call it a day. I'm guessing it has something to do with the time complexity?
A recursive solution is more intuitive but of course, is not O(1) in terms of extra space.