Nullbody Notes
Author

Nullbody Notes

Go backend development, learning open-source project source code together, focusing on simplicity and practicality.

60
Articles
0
Likes
0
Views
0
Comments
Recent Articles

Latest from Nullbody Notes

60 recent articles
Nullbody Notes
Nullbody Notes
Nov 16, 2023 · Interview Experience

Reverse a Linked List in K-Node Groups – Go Solution for Interviews

This article explains how to reverse a singly‑linked list in groups of K nodes by locating each segment's head and tail, reversing the segment, and recursively processing the remainder, with a complete Go implementation and step‑by‑step reasoning.

algorithminterviewk-group reversal
0 likes · 4 min read
Reverse a Linked List in K-Node Groups – Go Solution for Interviews
Nullbody Notes
Nullbody Notes
Nov 16, 2023 · Fundamentals

Understanding the Combination Sum Problem with Backtracking in Go

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.

GoLeetCodeRecursion
0 likes · 5 min read
Understanding the Combination Sum Problem with Backtracking in Go
Nullbody Notes
Nullbody Notes
Nov 15, 2023 · Fundamentals

Binary Search Solution for LeetCode 162: Find Peak Element

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.

GoLeetCodeO(log n)
0 likes · 4 min read
Binary Search Solution for LeetCode 162: Find Peak Element
Nullbody Notes
Nullbody Notes
Nov 14, 2023 · Interview Experience

Finding the Shortest Unsorted Subarray with a Monotonic Stack in Go

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
Finding the Shortest Unsorted Subarray with a Monotonic Stack in Go
Nullbody Notes
Nullbody Notes
Nov 11, 2023 · Fundamentals

How to Solve LeetCode 53: Maximum Subarray Sum with Dynamic Programming

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.

GoLeetCodealgorithm
0 likes · 4 min read
How to Solve LeetCode 53: Maximum Subarray Sum with Dynamic Programming
Nullbody Notes
Nullbody Notes
Nov 9, 2023 · Interview Experience

Validating Stack Sequences in Go: A Simple Microsoft Interview Solution

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.

GoLeetCodealgorithm
0 likes · 3 min read
Validating Stack Sequences in Go: A Simple Microsoft Interview Solution
Nullbody Notes
Nullbody Notes
Feb 21, 2021 · Fundamentals

Implementing the Chain of Responsibility Pattern in Go

This article explains the Chain of Responsibility design pattern, illustrates it with a company expense‑approval scenario, and provides complete Go code—including an interface, Staff, Manager, and CEO structs—showing how to build a flexible, extensible approval chain.

Chain of ResponsibilityDesign PatternExtensibility
0 likes · 6 min read
Implementing the Chain of Responsibility Pattern in Go