- 355
- 52 339 297
NeetCode
United States
Registrace 28. 05. 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) / czcams.com/users/Sappheiros
Music promoted by BreakingCopyright: czcams.com/video/uhqMKpppnpo/video.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) / 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
Design Youtube - System Design Interview
zhlédnutí 250KPřed rokem
Design CZcams - System Design Interview
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
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
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
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.
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`
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
“And of course everyone’s favourite: Dynamic programming”
You always explain such this it is one of the best explanation🤩
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.
beautiful drawing and great explanation!!!!!!
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; } }
Thanks!
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]); } }
fk it word1=word2
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.
Amen
This shit does not make sense bruh. I'm cooked.
i did the trie for the matrix instead of given words lol
@NeetCode What are you using for a tablet/whiteboarding software?
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?
using a stack is over kill.. just travel inorder, and set k = k - 1. When k == 0 it's the correct value
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.
I love you man! ❤ Keep up the great work
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
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.
perfect solution and illustration, thanks so much
what if we come to know that 0 is child of 6 at the end
having 2 while loop in this case == O(n²) time?
it isn't intuitive, if you have to forcefully apply binary search, given you have the optimal time complexity known.
u only need to care if indexes before value 0 can get pass it or not
Thanks! Wonderful explanation
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
aw < 3
what is the time complexity for this solution?
i dont understand the "if dp[amount] != amount + 1 else return -1". Why is this if statement valid?
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
How does this solution take into account the fact that |n - m| <= 1 ?
public int missingNumber(int[] nums) { int xor = nums.length; for(int i=0;i<nums.length;i++){ xor ^= i; xor ^= nums[i]; } return xor; }
Easy 🤡
Why is both "visit" and "output" required? One of them should be enough right?
everyone at first talking about market. Sad reality but
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
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.
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 .
so Mr. Beast was a software engineer so amazed by youtube architecture that he started youtubing
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)
Can we all agree coding interviews are a form of hazing?
what is the space complexity?