Tagged articles
67 articles
Page 1 of 1
Java Tech Enthusiast
Java Tech Enthusiast
Apr 19, 2026 · Interview Experience

Counting Boomerangs Efficiently: Hash‑Map Solution for LeetCode 447

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.

BoomerangHashMapLeetCode
0 likes · 7 min read
Counting Boomerangs Efficiently: Hash‑Map Solution for LeetCode 447
Java Tech Enthusiast
Java Tech Enthusiast
Jan 31, 2026 · Interview Experience

How to Remove the Most Edges While Keeping a Graph Fully Traversable for Alice and Bob

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.

LeetCodealgorithmedge removal
0 likes · 9 min read
How to Remove the Most Edges While Keeping a Graph Fully Traversable for Alice and Bob
IT Services Circle
IT Services Circle
Jan 9, 2026 · Interview Experience

How to Find the Longest Balanced Substring in a Binary String (LeetCode 2609)

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
How to Find the Longest Balanced Substring in a Binary String (LeetCode 2609)
IT Services Circle
IT Services Circle
Sep 8, 2025 · Fundamentals

How to Count Subarrays with Sum K Using Prefix Sum and HashMap

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.

CJavaLeetCode
0 likes · 6 min read
How to Count Subarrays with Sum K Using Prefix Sum and HashMap
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 18, 2025 · Databases

Unlocking LeetCode’s Hardest SQL Problem with Window Functions

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+.

LeetCodeSQLWindow Functions
0 likes · 10 min read
Unlocking LeetCode’s Hardest SQL Problem with Window Functions
IT Services Circle
IT Services Circle
Jun 27, 2025 · Fundamentals

How to Solve the Champagne Tower Problem on LeetCode with Linear DP

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.

CDPLeetCode
0 likes · 8 min read
How to Solve the Champagne Tower Problem on LeetCode with Linear DP
Su San Talks Tech
Su San Talks Tech
Mar 10, 2025 · Fundamentals

Generate All k-Number Combinations from 1 to n (LeetCode 77)

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.

BacktrackingC++Java
0 likes · 6 min read
Generate All k-Number Combinations from 1 to n (LeetCode 77)
Java Tech Enthusiast
Java Tech Enthusiast
Feb 4, 2025 · Fundamentals

LeetCode 31 – Next Permutation: Problem, Analysis, and Code

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.

CJavaLeetCode
0 likes · 7 min read
LeetCode 31 – Next Permutation: Problem, Analysis, and Code
Java Tech Enthusiast
Java Tech Enthusiast
Dec 12, 2024 · Fundamentals

LeetCode 814: Binary Tree Pruning

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.

CJavaLeetCode
0 likes · 6 min read
LeetCode 814: Binary Tree Pruning
Java Tech Enthusiast
Java Tech Enthusiast
Dec 7, 2024 · Interview Experience

Solve LeetCode 739 ‘Daily Temperatures’ Using a Monotonic Stack

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.

CDaily TemperaturesJava
0 likes · 6 min read
Solve LeetCode 739 ‘Daily Temperatures’ Using a Monotonic Stack
Java Tech Enthusiast
Java Tech Enthusiast
Dec 1, 2024 · Fundamentals

LeetCode 34: Binary Search Range

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.

Binary SearchCJava
0 likes · 8 min read
LeetCode 34: Binary Search Range
Tencent Cloud Developer
Tencent Cloud Developer
Oct 29, 2024 · Backend Development

Improving Backend Engineer Skills: Abstract Problem Solving and Code Abstractions

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.

Backend DevelopmentCode AbstractionGo language
0 likes · 22 min read
Improving Backend Engineer Skills: Abstract Problem Solving and Code Abstractions
Java Tech Enthusiast
Java Tech Enthusiast
May 1, 2024 · Fundamentals

Zigzag Conversion Algorithm (LeetCode 6)

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.

CJavaLeetCode
0 likes · 9 min read
Zigzag Conversion Algorithm (LeetCode 6)
DaTaobao Tech
DaTaobao Tech
Apr 24, 2024 · Fundamentals

Comprehensive Collection of Algorithm Templates and Code Snippets for LeetCode

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.

Data StructuresLeetCodealgorithm
0 likes · 25 min read
Comprehensive Collection of Algorithm Templates and Code Snippets for LeetCode
Alibaba Cloud Developer
Alibaba Cloud Developer
Apr 11, 2024 · Fundamentals

Master LeetCode Algorithms: Essential Python Templates for Interviews

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.

AlgorithmsBacktrackingData Structures
0 likes · 30 min read
Master LeetCode Algorithms: Essential Python Templates for Interviews
IT Services Circle
IT Services Circle
Feb 20, 2024 · Fundamentals

LeetCode 392: Determine if a String is a Subsequence Using the Two‑Pointer Technique

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.

C++JavaLeetCode
0 likes · 8 min read
LeetCode 392: Determine if a String is a Subsequence Using the Two‑Pointer Technique
IT Services Circle
IT Services Circle
Nov 21, 2023 · Fundamentals

LeetCode 42 – Trapping Rain Water: Problem Overview and Three O(n) Solution Techniques (Two‑Pointer, Prefix‑Max, Monotonic Stack)

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
LeetCode 42 – Trapping Rain Water: Problem Overview and Three O(n) Solution Techniques (Two‑Pointer, Prefix‑Max, Monotonic Stack)
IT Services Circle
IT Services Circle
Apr 11, 2022 · Fundamentals

Maximum Satisfaction (LeetCode 1402) – Greedy Algorithm Solution

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.

JavaLeetCodeSorting
0 likes · 4 min read
Maximum Satisfaction (LeetCode 1402) – Greedy Algorithm Solution
NiuNiu MaTe
NiuNiu MaTe
Mar 15, 2022 · Fundamentals

Master the Container With Most Water: Two‑Pointer Solution Explained

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.

LeetCodealgorithmcontainer-water
0 likes · 4 min read
Master the Container With Most Water: Two‑Pointer Solution Explained
NiuNiu MaTe
NiuNiu MaTe
Feb 15, 2022 · Fundamentals

Why Do Only Perfect Squares Stay Lit? Solving the Bulb Switch Puzzle

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.

LeetCodealgorithmbulb-switch
0 likes · 7 min read
Why Do Only Perfect Squares Stay Lit? Solving the Bulb Switch Puzzle
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 13, 2021 · Fundamentals

Sliding Window Technique: Concepts, Framework, and LeetCode Examples

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.

LeetCodeSliding Windowalgorithm
0 likes · 10 min read
Sliding Window Technique: Concepts, Framework, and LeetCode Examples
WeDoctor Frontend Technology
WeDoctor Frontend Technology
Oct 13, 2021 · Fundamentals

Decode Chinese ID Cards & Solve Classic LeetCode Problems with JavaScript

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
Decode Chinese ID Cards & Solve Classic LeetCode Problems with JavaScript
Programmer DD
Programmer DD
Oct 2, 2021 · Fundamentals

Master Algorithm Interviews: Core Topics & Proven Study Plan

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.

Data StructuresLeetCodealgorithm interview
0 likes · 6 min read
Master Algorithm Interviews: Core Topics & Proven Study Plan
Liangxu Linux
Liangxu Linux
Apr 10, 2021 · Fundamentals

Master LeetCode Problem Solving with VSCode: A Complete Setup Guide

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.

ExtensionsIDELeetCode
0 likes · 5 min read
Master LeetCode Problem Solving with VSCode: A Complete Setup Guide
Liangxu Linux
Liangxu Linux
Apr 14, 2020 · Fundamentals

Unlock Algorithm Mastery with the ‘Fucking Algorithm’ GitHub Repository

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.

LeetCodealgorithmalgorithmic thinking
0 likes · 3 min read
Unlock Algorithm Mastery with the ‘Fucking Algorithm’ GitHub Repository
FunTester
FunTester
Mar 21, 2020 · Fundamentals

How to Find Duplicate Numbers in an Array in O(n) Time and O(1) Space

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.

ArrayJavaJavaScript
0 likes · 5 min read
How to Find Duplicate Numbers in an Array in O(n) Time and O(1) Space
Liangxu Linux
Liangxu Linux
Nov 4, 2019 · Fundamentals

Master LeetCode: Proven Strategies to Boost Your Coding Interview Skills

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.

LeetCodeSoftware Engineeringalgorithm practice
0 likes · 7 min read
Master LeetCode: Proven Strategies to Boost Your Coding Interview Skills
Java Captain
Java Captain
Apr 25, 2019 · Fundamentals

Effective Strategies for Algorithm Practice and Problem Solving

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.

LeetCodealgorithmcoding interview
0 likes · 9 min read
Effective Strategies for Algorithm Practice and Problem Solving