MeldenCodeWithWho@CodeWithWhoBuilding software that solves real problems. Software Engineer | Frontend | Backend Shipping ideas to the internet.https://t.co/coDfAjyBAeLid sinds maart 2026158 Volgend97 Volgers934 BerichtenBerichtenMediaCodeWithWho@CodeWithWho·7moYesterday I wore an article on how my last week went Its is posted on LinkedInDelenGekopieerd017247CodeWithWho@CodeWithWho·7dTaking every customer from one list and rescanning a huge second dataset each time works, but it scales badly. #softwareengineering #algorithms Watch:DownloadenDelenGekopieerd000CodeWithWho@CodeWithWho·7dIntersection means unique common values. If 3 is already in the result, another 3 should not be added again. #arrays #algorithms Watch:DownloadenDelenGekopieerd0003CodeWithWho@CodeWithWho·7dOnce A[i] matches something in B, existence is confirmed. Add it and stop scanning for that candidate. #algorithms #python Watch:DownloadenDelenGekopieerd0002CodeWithWho@CodeWithWho·7dOne value from A can force a full scan of B when no match exists. That's where repeated work begins. #algorithms #optimization Watch:DownloadenDelenGekopieerd0007CodeWithWho@CodeWithWho·7dBrute force: take one unique value from A, scan B for a match, add it if found, then repeat. #algorithms #arrays Watch:DownloadenDelenGekopieerd0005CodeWithWho@CodeWithWho·1wAlgorithm choice depends on data shape. 1M vs 1M and 100 vs 10M may deserve completely different strategies. #softwareengineering #algorithms Watch:DownloadenDelenGekopieerd00113CodeWithWho@CodeWithWho·1wn << m could mean 100 values vs 1,000,000. Same problem, very different data shape. #algorithms #optimization Watch:DownloadenDelenGekopieerd0007CodeWithWho@CodeWithWho·1wn ≈ m means roughly the same scale, not exactly equal. Example: 1,000 vs 1,200 elements. #algorithms Watch:DownloadenDelenGekopieerd0005CodeWithWho@CodeWithWho·1wIf the problem tells you the arrays are sorted, use that information. Sorted order can eliminate unnecessary work. #algorithms #optimization Watch:DownloadenDelenGekopieerd0005CodeWithWho@CodeWithWho·1wArray intersection = values that exist in both A and B, with no duplicates in the result. #algorithms #arrays Watch:DownloadenDelenGekopieerd0027CodeWithWho@CodeWithWho·1wBrute force remembers used positions. Hashing remembers remaining quantity. The better representation removes repeated discovery. #optimization #hashtables Watch:DownloadenDelenGekopieerd0004CodeWithWho@CodeWithWho·1wEvery character in L may scan all of M: O(l × m), or roughly O(n²) when both inputs are similar in size. #bigO #algorithms Watch:DownloadenDelenGekopieerd00017CodeWithWho@CodeWithWho·1wBrute force repeatedly searches M. Hashing builds inventory once and consumes it. Same answer, much less repeated work. #algorithms #hashtables Watch:DownloadenDelenGekopieerd0004CodeWithWho@CodeWithWho·1wCount already 0? Fail immediately. Same logic applies to stock, seats, credits and quotas in real systems. #softwareengineering #hashtables Watch:DownloadenDelenGekopieerd0027CodeWithWho@CodeWithWho·1wSecond 'a'? No search. Read char_count['a'], decrement, continue. That's the hash-table advantage. #optimization #hashtables Watch:DownloadenDelenGekopieerd0003CodeWithWho@CodeWithWho·1wLetter demand just decrements inventory: a 2→1, b 1→0. No magazine rescan. #algorithms #hashtables Watch:DownloadenDelenGekopieerd0007CodeWithWho@CodeWithWho·1wOptimized debugger: watch the current char and char_count. Those two values show supply being built and consumed. #python #debugging Watch:DownloadenDelenGekopieerd0001CodeWithWho@CodeWithWho·1wM='aabc' becomes a→2, b→1, c→1 in the debugger. Supply is built once before demand starts. #python #hashtables Watch:DownloadenDelenGekopieerd0002CodeWithWho@CodeWithWho·2wTicket inventory uses the same idea: Standard→120, VIP→15, then bookings consume the counts. Resource → quantity → demand. #softwareengineering Watch:DownloadenDelenGekopieerd0005CodeWithWho@CodeWithWho·2wCount already zero and demand asks for another unit? Fail immediately. No need to search for inventory we already know is gone. #hashtables #optimization Watch:DownloadenDelenGekopieerd0003
CodeWithWho@CodeWithWho·7moYesterday I wore an article on how my last week went Its is posted on LinkedInDelenGekopieerd017247
CodeWithWho@CodeWithWho·7dTaking every customer from one list and rescanning a huge second dataset each time works, but it scales badly. #softwareengineering #algorithms Watch:DownloadenDelenGekopieerd000
CodeWithWho@CodeWithWho·7dIntersection means unique common values. If 3 is already in the result, another 3 should not be added again. #arrays #algorithms Watch:DownloadenDelenGekopieerd0003
CodeWithWho@CodeWithWho·7dOnce A[i] matches something in B, existence is confirmed. Add it and stop scanning for that candidate. #algorithms #python Watch:DownloadenDelenGekopieerd0002
CodeWithWho@CodeWithWho·7dOne value from A can force a full scan of B when no match exists. That's where repeated work begins. #algorithms #optimization Watch:DownloadenDelenGekopieerd0007
CodeWithWho@CodeWithWho·7dBrute force: take one unique value from A, scan B for a match, add it if found, then repeat. #algorithms #arrays Watch:DownloadenDelenGekopieerd0005
CodeWithWho@CodeWithWho·1wAlgorithm choice depends on data shape. 1M vs 1M and 100 vs 10M may deserve completely different strategies. #softwareengineering #algorithms Watch:DownloadenDelenGekopieerd00113
CodeWithWho@CodeWithWho·1wn << m could mean 100 values vs 1,000,000. Same problem, very different data shape. #algorithms #optimization Watch:DownloadenDelenGekopieerd0007
CodeWithWho@CodeWithWho·1wn ≈ m means roughly the same scale, not exactly equal. Example: 1,000 vs 1,200 elements. #algorithms Watch:DownloadenDelenGekopieerd0005
CodeWithWho@CodeWithWho·1wIf the problem tells you the arrays are sorted, use that information. Sorted order can eliminate unnecessary work. #algorithms #optimization Watch:DownloadenDelenGekopieerd0005
CodeWithWho@CodeWithWho·1wArray intersection = values that exist in both A and B, with no duplicates in the result. #algorithms #arrays Watch:DownloadenDelenGekopieerd0027
CodeWithWho@CodeWithWho·1wBrute force remembers used positions. Hashing remembers remaining quantity. The better representation removes repeated discovery. #optimization #hashtables Watch:DownloadenDelenGekopieerd0004
CodeWithWho@CodeWithWho·1wEvery character in L may scan all of M: O(l × m), or roughly O(n²) when both inputs are similar in size. #bigO #algorithms Watch:DownloadenDelenGekopieerd00017
CodeWithWho@CodeWithWho·1wBrute force repeatedly searches M. Hashing builds inventory once and consumes it. Same answer, much less repeated work. #algorithms #hashtables Watch:DownloadenDelenGekopieerd0004
CodeWithWho@CodeWithWho·1wCount already 0? Fail immediately. Same logic applies to stock, seats, credits and quotas in real systems. #softwareengineering #hashtables Watch:DownloadenDelenGekopieerd0027
CodeWithWho@CodeWithWho·1wSecond 'a'? No search. Read char_count['a'], decrement, continue. That's the hash-table advantage. #optimization #hashtables Watch:DownloadenDelenGekopieerd0003
CodeWithWho@CodeWithWho·1wLetter demand just decrements inventory: a 2→1, b 1→0. No magazine rescan. #algorithms #hashtables Watch:DownloadenDelenGekopieerd0007
CodeWithWho@CodeWithWho·1wOptimized debugger: watch the current char and char_count. Those two values show supply being built and consumed. #python #debugging Watch:DownloadenDelenGekopieerd0001
CodeWithWho@CodeWithWho·1wM='aabc' becomes a→2, b→1, c→1 in the debugger. Supply is built once before demand starts. #python #hashtables Watch:DownloadenDelenGekopieerd0002
CodeWithWho@CodeWithWho·2wTicket inventory uses the same idea: Standard→120, VIP→15, then bookings consume the counts. Resource → quantity → demand. #softwareengineering Watch:DownloadenDelenGekopieerd0005
CodeWithWho@CodeWithWho·2wCount already zero and demand asks for another unit? Fail immediately. No need to search for inventory we already know is gone. #hashtables #optimization Watch:DownloadenDelenGekopieerd0003