Archives
All the articles I've archived.
System Design - How do Websockets Work
Published: at 06:23 AMHow do websockets work comparing to http?
LeetCode 658 LintCode 460 Find K Closest Elements
Published: at 06:23 AMSolutions for LeetCode 658 LintCode 460, medium, tags: array, binary-search, sliding-window, sorting, heap; companies: google.
LeetCode 2539 LintCode 3855 Count the Number of Good Subsequences
Published: at 06:23 AMSolutions for LeetCode 2539 LintCode 3855, hard, tags: enumerate, string, hash table, math, combinatorics, counting.
LeetCode 2450 LintCode 3841 Number of Distinct Binary Strings After Applying Operations
Updated: at 06:23 AMSolutions for LeetCode 2450 LintCode 3841, medium, tags: math, string.
System Design - Event Loop for Concurrent Applications
Published: at 06:23 AMevent loop system design pattern/construct event loop (message dispatcher), reactor/actor pattern, non-blocking mechanism for concurrent applications
HackerRank and GeeksForGeeks Minimum Replacements/Substitutions to Make Adjacent Characters Unequal
Published: at 06:23 AMSolutions for , easy, tags: array, sliding window; companies: salesforce.
How could we interview job candidates to find the right teammates? Why should we care?
Updated: at 10:12 AMhow should we interview other job candidates to find the teammates we like? tips and suggestions on how to interview teammate or junior engineers.
LeetCode 206 LintCode 35 Reverse Linked List
Published: at 06:23 AMSolutions for LeetCode 206 LintCode 35, easy, tags: linked list, recursion; companies: bytedance.
LeetCode 532 LintCode 1187 K-diff Pairs in An Array
Published: at 06:23 AMSolutions for LeetCode 532 LintCode 1187, medium, tags: array, hash table, counting, two-pointers, binary-search; companies: nvidia, amazon.
LeetCode 916 LintCode 1726 Word Subsets
Published: at 06:23 AMSolutions for LeetCode 916 LintCode 1726, medium, tags: array, hash table, string.
LeetCode 1166 LintCode 3677 Design File System
Published: at 06:23 AMSolutions for LeetCode 1166 LintCode 3677, medium, tags: hash table, trie, string, design.
LeetCode 1400 Construct K Palindrome Strings
Published: at 06:23 AMSolutions for LeetCode 1400, medium, tags: hash table, string, greedy, counting.
LeetCode 1930 Unique Length-3 Palindromic Subsequences
Published: at 06:23 AMSolutions for LeetCode 1930, medium, tags: hash table, string, bit manipulation, prefix sum.
LeetCode 2017 Grid Game
Published: at 06:23 AMSolutions for LeetCode 2017, medium, tags: array, prefix sum, dynamic programming, matrix.
LeetCode 542 LintCode 974 01 Matrix and LeetCode 1765 Map of Highest Peak
Published: at 06:23 AMSolutions for LeetCode 542, LeetCode 1765, and LintCode 974, hard, tags: array, queue, sliding window, heap, monotonic queue.
LeetCode Meeting Rooms Derivative Question
Published: at 06:23 AMSolutions for meeting rooms derivative question, hard, tags: heap, line sweep, ordered map; companies: salesforce.
Generative AI (Artificial Intelligence) with Large Language Models (LLM) - Part 1
Updated: at 10:12 AMgenerative AI (artificial intelligence) machine learning with large language models
AWS (Amazon Web Services) Tips and Cheatsheet
Updated: at 10:12 AMtips for using AWS
How to Draw Circles and Arcs with Python Library Matplotlib
Updated: at 10:12 AMtips for matplotlib python draw arcs, robot walks, project euler 208
How to Install SortedContainers in the Python Shell or With a Python Script
Updated: at 10:12 AMtips for installing sortedcontainers in a python shell
Java CheatSheet
Updated: at 10:12 AMtips for using java
Linux Cheatsheet, tips and Commands
Updated: at 10:12 AMtips for linux commands and tips
HackerRank GET Requests for GIF Images
Published: at 06:23 AMSolutions for hacker rank get requests for gif images, medium, tags: file, hash set.
HackerRank Programmer Strings
Published: at 06:23 AMSolutions for HackerRank Programmer Strings, hard, tags: string, hash table.
HackerRank Robot Walks and Project Euler 208 Solutions
Published: at 06:23 AMSolutions for project euler 208 and hackerrank question robot walks, hard, tags: math, simulation.
LeetCode 1 LintCode 56 Two Sum
Published: at 06:23 AMSolutions for LeetCode 1 LintCode 56, easy, tags: array, hash table.
LeetCode 53 LintCode 41 Maximum Subarray
Published: at 08:23 AMSolutions for LeetCode 53 and LintCode 41, medium, tags: array, divide and conquer, dynamic programming, prefix sum, companies: ltk.
LeetCode 339 LintCode 551 Nested List Weight Sum
Published: at 07:23 AMSolutions for LeetCode 339 LintCode 551, medium, tags: dfs, bfs; companies: salesforce.
LeetCode 520 LintCode 1202 IPO
Published: at 06:23 AMSolutions for LeetCode 520 LintCode 1202, hard, tags: array, heap, greedy, sorting, binary search, dynamic programming, quick select.
LeetCode 540 LintCode 1183 Single Element in a Sorted Array
Published: at 06:23 AMSolutions for LeetCode 540 LintCode 1183, medium, tags: array, binary search.
LeetCode 691 LintCode 1081 Stickers to Spell Word
Published: at 06:23 AMSolutions for LeetCode 239, hard, tags: array, queue, sliding window, heap, monotonic queue.
LeetCode 713 LintCode 1075 Subarray Product Less Than K
Published: at 06:23 AMSolutions for LeetCode 713 and LintCode 1075, medium, tags: sliding window, two pointers, prefix sum; companies: salesforce, yatra.
LeetCode 875 LintCode 1492 Koko Eating Bananas
Published: at 06:23 AMSolutions for LeetCode 875 LintCode 1492, medium, tags: array, binary search; companies: facebook, salesforce.
LeetCode 994 LintCode 3726 Rotting Oranges
Published: at 06:23 AMSolutions for LeetCode 994 LintCode 3726, medium, tags: graph, bfs, array; companies: tiktok.
LeetCode 1422 Maximum Score After Splitting a String
Published: at 06:23 AMSolutions for LeetCode 1422, easy, tags: string, prefix sum.
LeetCode 1650 LintCode 474 Lowest Common Ancestor of a Binary Tree III
Published: at 07:23 AMSolutions for LeetCode 1650 LintCode 474, medium, tags: binary tree, hash table, two pointers; companies: microsoft.
LeetCode 2415 Reverse Odd Levels of Binary Tree
Published: at 06:23 AMSolutions for LeetCode 239, hard, tags: array, queue, sliding window, heap, monotonic queue.
LeetCode 2466 LintCode 3854 Count Ways to Build Good Strings (Number of Good Binary Strings)
Published: at 06:23 AMSolutions for LeetCode 2466 LintCode 3854, medium, tags: array, dynamic programming.
LeetCode 2558 Take Gifts From the Richest Pile
Published: at 06:23 AMSolutions for LeetCode 2558, easy, tags: array, heap, simulation.
LeetCode 2559 Count Vowel Strings in Ranges
Published: at 06:23 AMSolutions for LeetCode 2559, medium, tags: array, string, prefix-sum.
LeetCode 408 LintCode 637 Valid Word Abbreviation
Published: at 06:23 AMSolutions for LeetCode 408 LintCode 637, easy, tags: two pointers, string, companies: facebook, google.
LeetCode 423 LintCode 1247 Reconstruct Original Digits from English
Published: at 06:23 AMSolutions for LeetCode 423 LintCode 1247, medium, tags: hash table, simulation, math, string.
Analyze Recursive Algorithm Time Complexity for LeetCode Questions with Substitution, Recursion Tree and Master Theorem
Published: at 06:23 AMAnalyze Recursive Algorithm Time Complexity for LeetCode Questions with Substitution, Recursion Tree and Master Theorem
Rust Option, Rc, and RefCell Explained - LeetCode Tree Node and LinkedList Node
Published: at 07:23 AMExplanation for rust data structure for tree node and linked list node. What is Rc and RefCell? Why Option<Rc<RefCell>>> three wrappers? How to avoid circular reference?
LintCode 26 Inner Product
Published: at 06:23 AMSolutions for LintCode 26, hard, tags: dynamic programming.
LintCode 2503 Thread Safe Counter (Concurrency)
Published: at 06:23 AMSolutions for LintCode 2503, tags: lock, re-entrant lock.
Add Discord and Disqus to your web site
Updated: at 10:12 AMadd discord and disqus to this site
Fun Bit Tricks (Manipulations)
Published: at 10:23 AMFun bitwise tricks such as count set bits, negate, ilog2, xor swap, .etc.
LeetCode 314 LintCode 651 Binary Tree Vertical Order Traversal
Updated: at 10:12 AMsolutions for LeetCode 314 LintCode 651 Binary Tree Vertical Order Traversal, tags: hash, bfs, tree, companies: facebook google
Database (MongoDB, Microsoft SQL Server) CheatSheet
Updated: at 10:12 AMtips for using mongodb
Cheatsheet for Math Knowledge Needed for LeetCode Algorithm Questions (Geometric Series and Arithmetic Progression Sum)
Published: at 06:23 AMcheatsheet for math knowledge needed for leetcode algorithm questions, geometric series sum
Vim CheatSheet
Updated: at 10:12 AMtips for using vim
CheatSheet for Windows Development
Updated: at 10:12 AMtips for software development in Windows Operating System
Elevator Closest Floors (Shortest Path, Related to Shortest Seek Time First Disk Seek Algorithm)
Updated: at 07:23 AMSolutions for Elevator Shortest Path, medium, tags: array, binary search.
How to Mark All as Read for Google Voice
Updated: at 10:12 AMtips for using google voice, mark all as read
HackerRank Bitwise Xor Operations
Published: at 08:23 AMSolutions for hackerrank bitwise xor operations, medium, tags: bit, companies: salesforce.
LeetCode 1 Similar Two Subtract Count
Published: at 07:23 AMSolutions for LeetCode 1 similar, medium, tags: array, hash table, companies: salesforce.
LeetCode 38 LintCode 420 Count and Say (Look and Say)
Updated: at 07:23 AMSolutions for LeetCode 38, LintCode 420, medium, tags: math, string, simulation, companies: facebook, pinterest.
Reverse of LeetCode 38 LintCode 420 Count and Say (Look and Say)
Updated: at 08:23 AMSolutions for LeetCode 38, LintCode 420, medium, tags: math, string, simulation, companies: facebook, pinterest.
LeetCode 91 Decode Ways and Hacker Rank ASCII Encoded Strings (VMWare, Goldman Sachs, and Salesforce Interview Questions)
Published: at 07:23 AMSolutions for LeetCode 91, medium, tags: string, dynamic programming, companies: goldman sachs, vmware, salesforce.
LeetCode 146 LintCode 134 LRU Cache
Published: at 09:23 AMSolutions for LeetCode 146 LintCode 134, medium, tags: hash, linked list, design, doubly linked list, companies: amazon, openai.
LeetCode 487 LintCode 883 Max Consecutive Ones II
Published: at 08:23 AMSolutions for LeetCode 487, LintCode 833, medium, tags: array, dynamic programming, sliding window, two pointers, companies: google.
LeetCode 811 LintCode 1006 Subdomain Visit Count
Published: at 06:23 AMSolutions for LeetCode 811 and LintCode 1006, medium, tags: array, hash, string, counting, companies: salesforce.
LeetCode 1041 LintCode 1345 Robot Bounded in Circle (GeeksForGeeks, HackerRank EnCircular)
Published: at 07:23 AMSolutions for LeetCode 1041 LintCode 1345 GFG HackerRank, medium, tags: math, string, simulation, companies: linkedin, salesforce.
LeetCode 1055 LintCode 3652 Shortest Way to Form String
Published: at 05:23 AMSolutions for LeetCode 1055 LintCode 3652, hard, tags: greedy, two pointers, string.
LeetCode 1192 LintCode 1271 Critical Connections in a Network
Updated: at 10:12 AMsolutions for LeetCode 1192, LintCode 1271, hard, tags: dfs, graph, bi-connected component. Companies: Amazon.
LeetCode 125 LintCode 415 Valid Palindrome
Updated: at 08:12 AMSolutions for LeetCode 125, LintCode 415, easy, tags: two pointers, string. Companies: LinkedIn, Facebook, Uber, Zenefits, Microsoft.
LeetCode 1346 Check If N and Its Double Exist
Published: at 06:23 AMSolutions for LeetCode 1346, easy, tags: array, hash table, two pointers, binary search, sorting.
LeetCode 1574 Shortest Subarray to be Removed to Make Array Sorted
Updated: at 07:22 AMSolutions for LeetCode 1574, medium, tags: array, binary-search, two-pointers.
LeetCode 1652 Defuse the Bomb
Updated: at 07:22 AMSolutions for LeetCode 1652, easy, tags: array, sliding window.
LeetCode 1804 LintCode 3729 Implement Trie II
Updated: at 09:23 AMSolutions for LeetCode 1804 LintCode 3729, medium, tags: design, trie, hash, string.
LeetCode 1930 Unique Length-3 Palindromic Subsequences
Updated: at 09:12 AMSolutions for LeetCode 1930, medium, tags: hash, string, bit, prefix sum.
LeetCode 2064 Minimized Maximum of Products Distributed to Any Store
Updated: at 05:12 AMSolutions for LeetCode 2064, medium, tags: array, binary search, heap.
LeetCode 214 LintCode 678 Shortest Palindrome (GeeksForGeeks Minimum Insertion to Form Shortest Palindrome)
Published: at 06:23 AMSolutions for LeetCode 239, LintCode 678, medium, tags: two pointers, string, kmp, rabin-karp, rolling hash.
LeetCode 2257 Count Unguarded Cells in the Grid
Updated: at 07:23 AMSolutions for LeetCode 2257, medium, tags: array, graph, simulation.
LeetCode 2461 Maximum Sum of Distinct Subarrays With Length K
Published: at 07:23 AMSolutions for LeetCode 2461, medium, tags: array, sliding window, hash.
LeetCode 2563 Count the Number of Fair Pairs
Updated: at 09:12 AMSolutions for LeetCode 2563, medium, tags: array, two pointers, binary search, sorting.
LeetCode 3043 Find the Length of the Longest Common Prefix
Updated: at 10:12 AMsolutions for LeetCode 3043, hard, tags: trie, string, array, hash.
LeetCode 3167 HackerRank Better Compression
Published: at 07:23 AMSolutions for LeetCode 3167 HackerRank Better Compression, tags: string, hash table, companies: salesforce.
LeetCode 3254 Find the Power of K-Size Subarrays I
Updated: at 07:22 AMSolutions for LeetCode 3254, medium, tags: array, sliding window.
LeetCode 465 LintCode 707 Optimal Account Balancing
Updated: at 07:24 AMSolutions for LeetCode 465 LintCode 707, hard, tags: bit, array, dynamic programming, backtracking, bitmask.
LeetCode 862 LintCode 1507 Shortest Subarray with Sum at Least K
Updated: at 07:22 AMSolutions for LeetCode 862, LintCode 1507, hard, tags: array, queue, sliding window, heap, monotonic queue, binary search, prefix sum.
LeetCode 239 LintCode 362 Sliding Window Maximum
Updated: at 10:12 AMsolutions for LeetCode 239, LintCode 362, hard, tags: array, queue, sliding window, heap, monotonic queue. Companies: Amazon, Zenefits, Microsoft, Google.
LintCode 2894 Order by frequency
Updated: at 07:22 AMSolutions for LintCode 2894, medium, tags: map, sort. Related to LeetCode 884 and 451.
LintCode 3127 How Many Times is Two Squared?
Published: at 06:23 AMSolutions for LintCode 3127, easy, tags: math, bit.
LeetCode 3133 Minimum Array End (bit)
Updated: at 05:12 PMSolution for leetcode 3133 Minimum Array End, tags: bit
LeetCode 3097 Shortest Subarray With OR at Least K II (bit)
Updated: at 05:12 PMsolution for leetcode 3097 Shortest Subarray With OR at Least K II, tags: bit, sliding-window, array
LintCode 179 Update Bits (bit)
Updated: at 05:12 PMsolution for lintcode 179 update bits, tags: bit
LeetCode 20 LintCode 423 Valid Parentheses (stack)
Updated: at 05:12 PMsolution for LeetCode 20 LintCode 423 valid parentheses, tags: stack, string; companies: goldman sachs, twitter, airbnb, amazon, facebook, microsoft, bloomberg, uber, google.
How to Embed an SVG Image/Picture with the Code or File on a Website
Published: at 03:23 AMthree main ways to embed an SVG image or picture as a file or using html code on a website
Mac Tips and Great Apps
Updated: at 10:12 AMtips for using mac
Cheatsheet for Python Data/AI Projects (Conda, Docker, Jupyter Notebook)
Updated: at 10:12 AMtips and cheatsheet for python data/AI projects using conda, docker, and jupyter notebook