Tagged articles
LeetCode
83 articles · Page 1 of 1
The article shares a career anecdote about a failed background check due to an omitted 5-day job, then provides a comprehensive solution to LeetCode 675 'Cut Off Trees for Golf Event' using BFS, A* search with Manhattan heuristic, and Union-Find pre-check for unreachable trees.
A*AlgorithmBFS
0 likes · 20 min read

Anthropic engineering manager Felix Rieseberg eliminates traditional coding interviews, arguing AI tools like Claude render LeetCode obsolete; the article analyzes three structural flaws of algorithm interviews, outlines a new AI-native competency model emphasizing judgment and AI collaboration, and surveys emerging alternatives like portfolio reviews and AI-paired coding.
AI collaborationAI hiringAnthropic
0 likes · 14 min read

This article covers big tech's zero-tolerance policy on AI-assisted interview cheating and provides a complete solution to LeetCode 1224 Maximum Equal Frequency using frequency counting and case analysis with implementations in Java, C++, Python, and TypeScript.
AlgorithmBig Tech HiringCase Analysis
0 likes · 10 min read

This article reveals big tech's zero-tolerance policy on AI-assisted interview cheating — including lifetime bans recorded in feedback systems — and provides a detailed solution to LeetCode 1224 (Maximum Equal Frequency) with counting-based case analysis and implementations in Java, C++, Python, and TypeScript.
AI cheatingAlgorithmC++
0 likes · 10 min read

This article outlines a structured 7-week preparation plan for system design interviews, recommending seven key resources — from foundational primers to real-world case studies — and emphasizes deliberate practice over passive video consumption to master trade-off reasoning under pressure.
7-week planAlex XuByteByteGo
0 likes · 12 min read

This article dissects the classic LeetCode #3 longest‑substring‑without‑repeating‑characters problem, shows why a HashSet‑based solution incurs heavy boxing overhead, and walks through three progressive optimizations—using a boolean array, index‑jumping with an int array, and refined update timing—to shrink runtime from 8 ms to about 2 ms, while highlighting common pitfalls and best‑practice guidelines.
AlgorithmHashSetJava
0 likes · 12 min read

The paper introduces the Autogenesis Protocol (AGP), a two‑layer resource‑governed framework that lets agents safely modify their own prompts, tools, memory and environment, and demonstrates its effectiveness with the AGS system achieving 93.33% GAIA validation accuracy and near‑full scores on C++ LeetCode problems.
AGPAutogenesisGAIA benchmark
0 likes · 11 min read

Big tech companies use LeetCode algorithm tests as a standardized, quantifiable filter to gauge learning potential and problem‑solving skills, even though these tests do not reflect real engineering ability, leading to a paradox where strong algorithm performers may lack practical coding quality and vice versa.
Algorithm InterviewsLeetCodebig tech
0 likes · 6 min read

This article walks through a step‑by‑step two‑pointer algorithm for LeetCode 80, showing how to delete duplicates in a sorted array in‑place so each element appears at most twice, with detailed code, pointer movement rules, and a generalization to K occurrences.
AlgorithmInterviewLeetCode
0 likes · 7 min read

This article explains how to count all boomerang tuples in a set of distinct points by using a hash‑map to store distance frequencies for each anchor point, achieving O(n²) time without costly square‑root calculations and providing Java, C++, and Python implementations.
AlgorithmBoomerangHashMap
0 likes · 7 min read

Given an undirected graph with three edge types—Alice‑only, Bob‑only, and shared—the task is to delete the maximum number of edges while still allowing both Alice and Bob to reach every node; the solution uses a two‑union‑find strategy, processes shared edges first, then exclusive ones, and returns the count or -1.
AlgorithmGraphLeetCode
0 likes · 9 min read

The article presents LeetCode problem 2609, defining a balanced substring as a consecutive segment of zeros followed by an equal number of ones, and provides a linear‑time solution using a two‑pointer scan that counts consecutive zeros and ones, with implementations in Java, C++, Python, and TypeScript, along with complexity analysis.
Balanced SubstringC++Java
0 likes · 7 min read

This article explains the fast‑slow (tortoise‑hare) pointer technique, lists its common applications such as cycle detection, middle‑node finding, palindrome checking, and demonstrates three LeetCode‑style solutions with step‑by‑step explanations and full Python code.
AlgorithmLeetCodecycle detection
0 likes · 7 min read

The article starts with a brief comment on recent layoffs before diving into the classic interview problem of shuffling an integer array uniformly, explaining why naive random swaps fail, detailing the Fisher‑Yates algorithm, and providing a complete Java implementation with key practical tips.
AlgorithmArray ShuffleFisher-Yates
0 likes · 7 min read

This article explains the LeetCode 162 'Find Peak Element' problem, presents both linear scan and binary search solutions in Java, proves the existence of a peak, and details the algorithmic reasoning, time and space complexities, with full code examples.
AlgorithmJavaLeetCode
0 likes · 8 min read

This article explains why the median is a crucial statistic for interpreting massive job‑application data, defines the median concept, introduces the classic LeetCode "Data Stream Median" problem, and shows how to maintain a dynamic median efficiently using a max‑heap and a min‑heap.
AlgorithmHeapLeetCode
0 likes · 12 min read

This article explains LeetCode problem 1749, which asks for the subarray with the maximum absolute sum, and shows how prefix sums reduce the task to tracking minimum and maximum prefix values, providing full reference implementations in Java, C++, Python, and TypeScript.
AlgorithmC++Java
0 likes · 8 min read

This article first highlights Ctrip's employee benefits, then presents the LeetCode 560 subarray sum problem with detailed explanations and multi-language implementations using prefix sum and hash map, including Java, C++, Python, and TypeScript solutions, and discusses time and space complexities.
AlgorithmC++Java
0 likes · 6 min read

This article examines LeetCode problem 185 – the hardest SQL challenge – by preparing the Employee and Department tables, presenting two solution approaches (a subquery and a window‑function version), benchmarking their performance on large test data, and explaining why window functions are the superior choice in MySQL 8+.
LeetCodeMySQLSQL
0 likes · 10 min read

The article reflects on the challenges of choosing college majors and then provides a comprehensive solution to LeetCode problem 1640, detailing the problem statement, examples, and multiple language implementations using sorting, binary search, and hash‑table techniques.
AlgorithmLeetCodearray reconstruction
0 likes · 9 min read

The article first examines how large tech companies are shifting away from short‑term performance cycles to encourage long‑term strategic work, then presents LeetCode problem 670 “Maximum Swap” with detailed explanations and implementations in Java, C++, Python, and TypeScript, including complexity analysis.
AlgorithmC++Java
0 likes · 8 min read

The article first reflects on ByteDance's expanding English testing policy, then presents LeetCode problem 799 “Champagne Tower”, describing its mechanics and offering a linear‑DP solution with full implementations in Java, C++, Python and TypeScript, along with complexity analysis.
AlgorithmC++DP
0 likes · 8 min read

This article explores why top engineers speak concisely, then dives into the classic LeetCode "Rotten Oranges" BFS interview question, providing a clear Java implementation, step‑by‑step analysis, and key takeaways for mastering grid‑based graph traversal.
BFSGridInterview
0 likes · 5 min read

This article presents the LeetCode 1514 'Maximum Probability Path' problem, explains the algorithm using a priority‑queue approach, provides full Java and C++ implementations, and concludes with a promotional book giveaway encouraging readers to follow the public account.
DijkstraGraphLeetCode
0 likes · 8 min read

This article presents LeetCode problem 1514, which asks for the path with the highest success probability in an undirected weighted graph, explains the problem statement, constraints, and provides detailed Java and C++ implementations using a priority‑queue based Dijkstra‑like algorithm.
DijkstraGraphLeetCode
0 likes · 7 min read

The article first highlights Tencent's Q1 2025 financial results and user metrics, then introduces the LeetCode 2013 'Detect Squares' problem, describing its requirements, example, and offering Java, C++, Python, and array‑based solutions along with time and space complexity analysis.
C++DataStructureDetectSquares
0 likes · 9 min read

The article first critiques a hiring manager’s salary‑balance rationale for a 985‑master candidate, then presents LeetCode problem 1546 on finding the maximum number of non‑overlapping subarrays whose sums equal a target, explaining the solution using prefix sums and providing Java and C++ implementations.
AlgorithmLeetCodePrefix Sum
0 likes · 6 min read

This article explains LeetCode problem 1546, which requires finding the maximum number of non‑empty, non‑overlapping subarrays whose sums equal a given target, discusses why a sliding‑window fails, and provides a prefix‑sum map solution with full Java and C++ implementations.
AlgorithmC++Java
0 likes · 6 min read

The author shares a personal roadmap of solving over 150 high‑frequency Go algorithm problems from CodeTop, emphasizing relentless repetition, concrete examples like the compressed prefix tree in Gin, and practical tips for turning algorithm practice into interview confidence.
AlgorithmCodeTopCompressed Prefix Tree
0 likes · 7 min read

This article explains LeetCode problem 1186, which asks for the maximum sum of a contiguous subarray after optionally deleting one element, and presents a dynamic‑programming solution with recurrence formulas, base cases, and full Java and C++ implementations.
AlgorithmC++Java
0 likes · 6 min read

The Word Break problem (LeetCode 139) asks whether a given string can be segmented into a sequence of dictionary words, and can be solved efficiently with dynamic programming by tracking reachable prefixes in a boolean array, as demonstrated by concise Java and C++ implementations.
C++JavaLeetCode
0 likes · 6 min read

This article walks through the LeetCode 77 "Combinations" problem, explaining the backtracking approach, presenting detailed examples, constraints, and providing complete implementations in Java, C++, and Python for generating all k‑element subsets of the range [1, n].
C++JavaLeetCode
0 likes · 6 min read

This article explains LeetCode problem 77, describing how to generate every possible combination of k numbers from the range 1 to n using backtracking, and provides complete Java, C++, and Python implementations along with a brief analysis and constraints.
C++JavaLeetCode
0 likes · 6 min read

This article explains the LeetCode Combination Sum II problem, detailing how to find all unique candidate combinations that sum to a target using sorting and backtracking while eliminating duplicate results, and provides complete implementations in Java, C++, C, and Python.
C++Combination Sum IIDuplicate Elimination
0 likes · 9 min read

This article explains the LeetCode 75 "Sort Colors" challenge, detailing the problem statement, constraints, a three‑pointer Dutch National Flag solution, and provides complete implementations in Java, C++, C, and Python without using built‑in sorting functions.
AlgorithmC++C++
0 likes · 7 min read

The Next Permutation problem asks to rearrange an integer array into the immediate lexicographically larger ordering—or the smallest order if none exists—by scanning from the right to find the first decreasing pair, swapping with the next larger element, and reversing the suffix, using O(1) extra space, with implementations provided in Java, C++, and Python.
AlgorithmC++Java
0 likes · 7 min read

LeetCode 57 asks you to insert a new interval into a sorted list of non‑overlapping intervals, merging any overlaps so the result stays sorted and disjoint, and the article explains the O(n) algorithm and provides concise implementations in Java, C++ and Python.
AlgorithmC++Java
0 likes · 6 min read

This article explains the LeetCode 31 "Next Permutation" problem, provides a detailed analysis of the algorithmic approach, and presents complete in‑place solutions in Java, C++, and Python, along with constraints and example cases.
AlgorithmLeetCodePython
0 likes · 7 min read

The article explains LeetCode 491, requiring all non‑decreasing subsequences of length ≥2 from an integer array, and details a depth‑first search approach that uses a per‑level set to skip duplicates, with complete example implementations in Java, C++, C, and Python.
C++DFSJava
0 likes · 7 min read

The article explains LeetCode 814, where a binary tree of 0s and 1s is pruned by recursively removing subtrees lacking a 1, using a post‑order traversal that returns null for nodes with value 0 and no retained children, achieving O(n) time and O(h) space.
AlgorithmC++Java
0 likes · 6 min read

This article explains the LeetCode 739 'Daily Temperatures' problem, describing how to compute the next warmer day for each temperature using a monotonic stack, and provides complete implementations in Java, C++, and Python, along with step‑by‑step analysis and example walkthroughs.
AlgorithmC++Daily Temperatures
0 likes · 6 min read

LeetCode 34 asks for the first and last indices of a target in a non‑decreasing integer array, returning [-1,-1] when absent, and can be solved in O(log n) time by applying two binary‑search passes—one locating the leftmost occurrence and the other the rightmost—illustrated with Java, C++, and Python implementations.
C++JavaLeetCode
0 likes · 8 min read

The article argues that a backend engineer’s growth hinges on mastering communication, clean coding, and architecture design by consistently abstracting problems—illustrated through Go’s ServerCodec and I/O interfaces, efficient algorithms like Trie‑based word search, and Rust’s ownership model—while recommending early Go/Rust study, reading well‑commented libraries, and hands‑on service building.
Code AbstractionGo LanguageLeetCode
0 likes · 22 min read

The article first shares a frustrated JD interview experience regarding a 'personality' assessment, then introduces LeetCode problem 814 – Binary Tree Pruning – detailing the problem statement, examples, and providing concise post‑order traversal solutions in Java, C++, and Python.
C++JavaLeetCode
0 likes · 6 min read

The article shares a candid interview anecdote about reasons for leaving a job, then presents LeetCode problem 542 “01 Matrix”, explains its DP and BFS approaches, and provides full Java, C++, and Python implementations.
C++JavaLeetCode
0 likes · 10 min read

This article presents LeetCode problem 112 "Path Sum", detailing the problem statement, example inputs and outputs, constraints, a recursive analysis, and complete reference implementations in Java, C++, and Python for determining whether a root‑to‑leaf path equals a given target sum.
AlgorithmC++Java
0 likes · 5 min read

The Zigzag Conversion algorithm rearranges an input string into a Z‑shaped pattern across a specified number of rows, tracks the current row while toggling direction at the top and bottom, stores characters per row, and finally concatenates the rows to produce the transformed string, with reference implementations in C++, Java, and Python.
AlgorithmC++Java
0 likes · 9 min read

This article introduces the LeetCode Hard‑level "Basic Calculator" problem, explains its interview background, provides a detailed problem statement with examples, outlines the key algorithmic concepts and solution approach using a stack, and includes a complete Java reference implementation.
AlgorithmExpression EvaluationLeetCode
0 likes · 9 min read

This guide compiles essential Python built‑in functions, data‑structure utilities, and ready‑to‑use algorithmic templates—including dynamic programming, backtracking with caching, binary search, bit manipulation, union‑find, topological sort, monotonic stack, sliding window, prefix sums, two‑pointer and graph traversals—to accelerate LeetCode problem solving.
AlgorithmLeetCodedata structures
0 likes · 25 min read

This article presents LeetCode problem 797, which asks for all possible paths from node 0 to node n‑1 in a directed acyclic graph, explains the DFS approach, lists constraints and examples, and provides complete implementations in Java, C++, C, and Python.
AlgorithmC++DFS
0 likes · 8 min read

This article compiles a comprehensive set of Python algorithm templates—including syntax shortcuts, knapsack solutions, backtracking, union‑find, topological sorting, monotonic stacks, binary search, dynamic programming, prefix sums, two‑pointer techniques, tree traversals, and graph algorithms—providing clear code snippets and explanations to help developers ace LeetCode interview problems.
AlgorithmsGraphLeetCode
0 likes · 30 min read

The article humorously discusses Huawei cafeteria competition before presenting LeetCode problem 102, which requires a breadth‑first level order traversal of a binary tree, and provides complete Java, C++, C, and Python implementations that use a queue to process each tree level.
AlgorithmBFSC++
0 likes · 7 min read

This article humorously references recent layoff memes before presenting a detailed tutorial on solving LeetCode problem 392—checking whether string s is a subsequence of t—using a two‑pointer algorithm, complete with step‑by‑step explanation, complexity analysis, visual illustrations, and reference implementations in C++, Java, and Python.
AlgorithmC++Java
0 likes · 8 min read

This article explains why LeetCode submissions often receive Time Limit Exceeded errors, covering inefficient algorithms, infinite loops, redundant calculations, unsuitable data structures, and poor I/O handling, and illustrates common examples with specific problems and more efficient solutions.
AlgorithmLeetCodeTLE
0 likes · 5 min read

This article explains LeetCode problem 42 “Trapping Rain Water”, detailing the problem statement, example, and three efficient O(n) solution approaches—two‑pointer, prefix‑max arrays, and a monotonic stack—each accompanied by complete Java implementations and analysis of their logic.
JavaLeetCodeMonotonic Stack
0 likes · 7 min read

This article explains LeetCode problem 124, describing the definition of a path in a binary tree, analyzing the constraints, and providing a detailed Java implementation that uses depth‑first search to compute the maximum path sum while handling negative sub‑paths.
AlgorithmDFSJava
0 likes · 5 min read

This article explains the LeetCode 39 "Combination Sum" problem, illustrates recursion with an apple‑picking analogy, details the backtracking algorithm pattern, and provides a complete, well‑commented Go implementation that handles unlimited reuse of candidates and pruning based on the target sum.
GoLeetCodebacktracking
0 likes · 5 min read

This article explains how to solve LeetCode problem 162 (Find Peak Element) in O(log n) time using a binary‑search approach, detailing the three possible cases, providing pseudocode, and presenting a complete Go implementation that handles boundary conditions as negative infinity.
AlgorithmGoLeetCode
0 likes · 4 min read

The article explains how to locate the left and right boundaries of the unsorted segment in LeetCode 581 by using two monotonic stacks that store indices, and provides a complete Go implementation that returns the length of the shortest subarray whose sorting makes the whole array ordered.
LeetCodeMonotonic Stack
0 likes · 4 min read

The article explains a dynamic‑programming approach to the classic “Maximum Subarray Sum” problem, defining dp[i] as the best sum ending at index i, deriving the recurrence dp[i]=max(dp[i‑1]+nums[i], nums[i]), initializing base cases, and providing complete Go code.
AlgorithmGoLeetCode
0 likes · 4 min read

This article explains a recursive solution in Go for LeetCode problem 92, detailing how to reverse a sublist of a singly linked list between given positions by first locating the start node, using a helper to reverse the first n nodes, and correctly reconnecting the remaining parts.
GoLeetCodelinked list
0 likes · 5 min read

The article explains how to determine whether a given push sequence and pop sequence form a valid stack operation by using a temporary Go slice as a stack, iterating through the push list, and repeatedly popping while the top matches the next pop element, finally returning a boolean result.
AlgorithmGoInterview
0 likes · 3 min read

Discover a practical, step‑by‑step approach for beginners to master algorithm problems on LeetCode, illustrated by a 50‑year‑old learner’s journey, covering mindset, structured problem‑solving, iterative refinement, and dynamic‑programming techniques with concrete code examples.
LeetCodealgorithm practicebeginner guide
0 likes · 8 min read

This article explains the LeetCode 1402 problem of maximizing the total satisfaction score by arranging dishes, describes the greedy approach of sorting and using suffix sums, and provides a Java implementation that iteratively adds positive suffix sums to compute the optimal result.
AlgorithmJavaLeetCode
0 likes · 4 min read

This article presents a detailed walkthrough of the LeetCode "Container With Most Water" problem, covering the problem statement, a two‑pointer analysis, and a complete Java implementation, while highlighting key insights for efficiently maximizing water storage.
AlgorithmLeetCodeTwo-pointer
0 likes · 4 min read

This article explains how to count the number of isosceles acute‑angled triangles whose vertices lie on the vertices of a regular n‑gon, discusses separate cases for even and odd n, handles duplicate equilateral triangles, and provides a correct Java implementation that avoids integer overflow.
AlgorithmJavaLeetCode
0 likes · 8 min read

The article explains the classic bulb‑switch problem, showing how toggling bulbs in successive rounds leads to only those positioned at perfect‑square indices remaining on, derives the mathematical reasoning behind the pattern, and presents a concise O(1) solution using the integer square‑root of n.
AlgorithmLeetCodeMath
0 likes · 7 min read

The article explains that finding LeetCode problems difficult is common, discusses the necessity of algorithm practice for interviews, and offers a structured, incremental learning method to improve coding skills while maintaining motivation.
LeetCodealgorithm practicecoding interview
0 likes · 8 min read

This article introduces the sliding window algorithmic technique, explains its relation to TCP flow control, demonstrates its implementation with Java code for maximum subarray sum, longest substring without repeats, and minimum window substring problems, and provides a reusable framework for solving similar LeetCode challenges.
AlgorithmLeetCodesliding window
0 likes · 10 min read

This article explains how to parse Chinese ID numbers to extract gender and age, demonstrates the checksum calculation, and then walks through classic algorithm challenges—including climbing stairs, longest palindrome, trapping rain water, and greedy cookie allocation—providing clear JavaScript implementations for each.
AlgorithmsLeetCodedynamic programming
0 likes · 18 min read

This guide breaks down the essential data structures, complexity analysis, and algorithmic thinking needed for software engineering interviews, highlights the 80% of topics that dominate most tests, and recommends a systematic study roadmap and a comprehensive book to boost interview success.
Complexity AnalysisLeetCodealgorithm interview
0 likes · 6 min read

This article presents detailed explanations, algorithmic ideas, and complete Go code for reversing an entire singly linked list, reversing a sub‑list between positions m and n, finding the intersection node of two lists, detecting cycles, and partitioning a list around a pivot value.
AlgorithmLeetCodedata structures
0 likes · 14 min read

This guide walks you through downloading, installing, and configuring VSCode, exploring its interface, adding the LeetCode extension, and using language-specific plugins so you can efficiently browse, code, and submit LeetCode problems directly from the editor.
IDELeetCodeVSCode
0 likes · 5 min read

This article explains how to identify "lucky numbers"—elements whose value equals their frequency—in a list by progressively applying Python fundamentals such as set for deduplication, count, map, zip, filter, lambda and sorted, culminating in a concise one‑liner solution.
AlgorithmLeetCodeList
0 likes · 9 min read

This article explains the core concepts of recursion by walking through an array‑sum example and a LeetCode linked‑list removal problem, detailing the necessary base case, recursive formula, and providing complete Java implementations with step‑by‑step visual illustrations.
AlgorithmJavaLeetCode
0 likes · 10 min read

This article explains a promotional bottle‑exchange problem, presents example inputs and outputs, and demonstrates two greedy‑algorithm implementations in Java that compute the maximum number of bottles one can drink when empty bottles can be exchanged for new ones.
AlgorithmLeetCodeSimulation
0 likes · 6 min read

This article explains the classic Dutch National Flag problem, describes the three‑way partition algorithm with pointer analysis, and provides concise Python and Go implementations that sort an array of red, white, and blue elements in linear time and constant space.
AlgorithmDutch National FlagGo
0 likes · 6 min read

This article explains the LeetCode 88 problem of merging two sorted integer arrays, presents two solution approaches—simple concatenation with sorting and an optimal two‑pointer technique—and provides implementation examples in C++, Python, and Java to illustrate the concepts.
C++JavaLeetCode
0 likes · 3 min read

This article introduces the open‑source “Fucking Algorithm” project, a popular GitHub collection of over 60 LeetCode‑based articles that explain algorithm problems with detailed reasoning, aiming to improve developers' problem‑solving mindset and algorithmic thinking.
AlgorithmLeetCodealgorithmic thinking
0 likes · 3 min read

This article explains two algorithmic solutions for locating any duplicate number in an array of length n where values range from 0 to n‑1: a straightforward HashSet method using O(n) extra space and an in‑place swapping technique that achieves O(1) space, complete with Java and JavaScript code examples and complexity analysis.
HashSetJavaJavaScript
0 likes · 5 min read

This article presents a robust binary‑search template, explains why traditional implementations often fail, shows how to avoid overflow and infinite loops, and provides clear Java code and step‑by‑step guidance using real LeetCode problems as examples.
AlgorithmDebuggingJava
0 likes · 27 min read

This guide introduces LeetCode, explains why systematic practice matters for interview success, and outlines three essential habits—choosing a scientific problem order, learning top solutions, and regularly organizing patterns—while sharing personal experiences and practical tips for effective algorithm training.
LeetCodealgorithm practicecoding interview
0 likes · 7 min read

This article shares practical, step‑by‑step techniques for improving algorithm problem‑solving skills, emphasizing gradual difficulty progression, categorizing problems by data structure, a three‑stage solving process, and the importance of abstraction and sustained motivation for effective LeetCode practice.
AlgorithmLeetCodecoding interview
0 likes · 9 min read
