ReportCodeWithWho@CodeWithWhoBuilding software that solves real problems. Software Engineer | Frontend | Backend Shipping ideas to the internet.https://t.co/coDfAjyBAeJoined March 2026158 Following99 Followers930 PostsPostsMediaCodeWithWho@CodeWithWho·7moYesterday I wore an article on how my last week went Its is posted on LinkedInShareCopied017247CodeWithWho@CodeWithWho·12hTaking every customer from one list and rescanning a huge second dataset each time works, but it scales badly. #softwareengineering #algorithms Watch:DownloadShareCopied000CodeWithWho@CodeWithWho·14hIntersection means unique common values. If 3 is already in the result, another 3 should not be added again. #arrays #algorithms Watch:DownloadShareCopied0003CodeWithWho@CodeWithWho·16hOnce A[i] matches something in B, existence is confirmed. Add it and stop scanning for that candidate. #algorithms #python Watch:DownloadShareCopied0002CodeWithWho@CodeWithWho·18hOne value from A can force a full scan of B when no match exists. That's where repeated work begins. #algorithms #optimization Watch:DownloadShareCopied0006CodeWithWho@CodeWithWho·20hBrute force: take one unique value from A, scan B for a match, add it if found, then repeat. #algorithms #arrays Watch:DownloadShareCopied0005CodeWithWho@CodeWithWho·2dAlgorithm choice depends on data shape. 1M vs 1M and 100 vs 10M may deserve completely different strategies. #softwareengineering #algorithms Watch:DownloadShareCopied00113CodeWithWho@CodeWithWho·2dn << m could mean 100 values vs 1,000,000. Same problem, very different data shape. #algorithms #optimization Watch:DownloadShareCopied0007CodeWithWho@CodeWithWho·2dn ≈ m means roughly the same scale, not exactly equal. Example: 1,000 vs 1,200 elements. #algorithms Watch:DownloadShareCopied0005CodeWithWho@CodeWithWho·2dIf the problem tells you the arrays are sorted, use that information. Sorted order can eliminate unnecessary work. #algorithms #optimization Watch:DownloadShareCopied0005CodeWithWho@CodeWithWho·2dArray intersection = values that exist in both A and B, with no duplicates in the result. #algorithms #arrays Watch:DownloadShareCopied0027CodeWithWho@CodeWithWho·3dBrute force remembers used positions. Hashing remembers remaining quantity. The better representation removes repeated discovery. #optimization #hashtables Watch:DownloadShareCopied0004CodeWithWho@CodeWithWho·3dEvery 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:DownloadShareCopied00017CodeWithWho@CodeWithWho·3dBrute force repeatedly searches M. Hashing builds inventory once and consumes it. Same answer, much less repeated work. #algorithms #hashtables Watch:DownloadShareCopied0004CodeWithWho@CodeWithWho·4dCount already 0? Fail immediately. Same logic applies to stock, seats, credits and quotas in real systems. #softwareengineering #hashtables Watch:DownloadShareCopied0027CodeWithWho@CodeWithWho·4dSecond 'a'? No search. Read char_count['a'], decrement, continue. That's the hash-table advantage. #optimization #hashtables Watch:DownloadShareCopied0003CodeWithWho@CodeWithWho·4dLetter demand just decrements inventory: a 2→1, b 1→0. No magazine rescan. #algorithms #hashtables Watch:DownloadShareCopied0007CodeWithWho@CodeWithWho·4dOptimized debugger: watch the current char and char_count. Those two values show supply being built and consumed. #python #debugging Watch:DownloadShareCopied0001CodeWithWho@CodeWithWho·4dM='aabc' becomes a→2, b→1, c→1 in the debugger. Supply is built once before demand starts. #python #hashtables Watch:DownloadShareCopied0002CodeWithWho@CodeWithWho·5dTicket inventory uses the same idea: Standard→120, VIP→15, then bookings consume the counts. Resource → quantity → demand. #softwareengineering Watch:DownloadShareCopied0005CodeWithWho@CodeWithWho·5dCount already zero and demand asks for another unit? Fail immediately. No need to search for inventory we already know is gone. #hashtables #optimization Watch:DownloadShareCopied0003Show more posts
CodeWithWho@CodeWithWho·7moYesterday I wore an article on how my last week went Its is posted on LinkedInShareCopied017247
CodeWithWho@CodeWithWho·12hTaking every customer from one list and rescanning a huge second dataset each time works, but it scales badly. #softwareengineering #algorithms Watch:DownloadShareCopied000
CodeWithWho@CodeWithWho·14hIntersection means unique common values. If 3 is already in the result, another 3 should not be added again. #arrays #algorithms Watch:DownloadShareCopied0003
CodeWithWho@CodeWithWho·16hOnce A[i] matches something in B, existence is confirmed. Add it and stop scanning for that candidate. #algorithms #python Watch:DownloadShareCopied0002
CodeWithWho@CodeWithWho·18hOne value from A can force a full scan of B when no match exists. That's where repeated work begins. #algorithms #optimization Watch:DownloadShareCopied0006
CodeWithWho@CodeWithWho·20hBrute force: take one unique value from A, scan B for a match, add it if found, then repeat. #algorithms #arrays Watch:DownloadShareCopied0005
CodeWithWho@CodeWithWho·2dAlgorithm choice depends on data shape. 1M vs 1M and 100 vs 10M may deserve completely different strategies. #softwareengineering #algorithms Watch:DownloadShareCopied00113
CodeWithWho@CodeWithWho·2dn << m could mean 100 values vs 1,000,000. Same problem, very different data shape. #algorithms #optimization Watch:DownloadShareCopied0007
CodeWithWho@CodeWithWho·2dn ≈ m means roughly the same scale, not exactly equal. Example: 1,000 vs 1,200 elements. #algorithms Watch:DownloadShareCopied0005
CodeWithWho@CodeWithWho·2dIf the problem tells you the arrays are sorted, use that information. Sorted order can eliminate unnecessary work. #algorithms #optimization Watch:DownloadShareCopied0005
CodeWithWho@CodeWithWho·2dArray intersection = values that exist in both A and B, with no duplicates in the result. #algorithms #arrays Watch:DownloadShareCopied0027
CodeWithWho@CodeWithWho·3dBrute force remembers used positions. Hashing remembers remaining quantity. The better representation removes repeated discovery. #optimization #hashtables Watch:DownloadShareCopied0004
CodeWithWho@CodeWithWho·3dEvery 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:DownloadShareCopied00017
CodeWithWho@CodeWithWho·3dBrute force repeatedly searches M. Hashing builds inventory once and consumes it. Same answer, much less repeated work. #algorithms #hashtables Watch:DownloadShareCopied0004
CodeWithWho@CodeWithWho·4dCount already 0? Fail immediately. Same logic applies to stock, seats, credits and quotas in real systems. #softwareengineering #hashtables Watch:DownloadShareCopied0027
CodeWithWho@CodeWithWho·4dSecond 'a'? No search. Read char_count['a'], decrement, continue. That's the hash-table advantage. #optimization #hashtables Watch:DownloadShareCopied0003
CodeWithWho@CodeWithWho·4dLetter demand just decrements inventory: a 2→1, b 1→0. No magazine rescan. #algorithms #hashtables Watch:DownloadShareCopied0007
CodeWithWho@CodeWithWho·4dOptimized debugger: watch the current char and char_count. Those two values show supply being built and consumed. #python #debugging Watch:DownloadShareCopied0001
CodeWithWho@CodeWithWho·4dM='aabc' becomes a→2, b→1, c→1 in the debugger. Supply is built once before demand starts. #python #hashtables Watch:DownloadShareCopied0002
CodeWithWho@CodeWithWho·5dTicket inventory uses the same idea: Standard→120, VIP→15, then bookings consume the counts. Resource → quantity → demand. #softwareengineering Watch:DownloadShareCopied0005
CodeWithWho@CodeWithWho·5dCount already zero and demand asks for another unit? Fail immediately. No need to search for inventory we already know is gone. #hashtables #optimization Watch:DownloadShareCopied0003