2 Followers
22 Following
207 Posts

Day 9/60: Sliding window patterns

Today's note was about using a stable invariant so sliding window patterns feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#JavaScript #DSA #Algorithms

Day 9/60: Sliding window patterns

Today's note was about using a stable invariant so sliding window patterns feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#RustLang #DSA #Algorithms

Day 9/75: Sliding window - fixed size

Today's note was about using a stable invariant so sliding window - fixed size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#GoLang #DSA #Algorithms

Day 9/75: Sliding window - fixed size

Today's note was about using a stable invariant so sliding window - fixed size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#CPP #DSA #Algorithms

Day 9/75: Sliding window - fixed size

Today's note was about using a stable invariant so sliding window - fixed size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#Java #DSA #Algorithms

Day 9/75: Sliding window - fixed size

Today's note was about using a stable invariant so sliding window - fixed size feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#Python #DSA #Algorithms

Day 8/60: Two pointers technique

Today's note was about using a stable invariant so two pointers technique feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#JavaScript #DSA #Algorithms

Day 8/75: Two pointers technique in Go

Today's note was about using a stable invariant so two pointers technique in go feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#GoLang #DSA #Algorithms

Day 8/75: Two pointers technique

Today's note was about using a stable invariant so two pointers technique feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#CPP #DSA #Algorithms

Day 8/75: Two pointers technique

Today's note was about using a stable invariant so two pointers technique feels like a process instead of a trick. I kept coming back to the same checks: name the exact window, prefix, or pointer region each variable owns, reuse prior work instead of recomputing the same range each iteration, and test boundary sizes first because they expose weak invariants quickly.

The failure mode worth watching is moving boundaries before stating what region they actually represent. If that happens, the implementation usually looks busy while the invariant is already gone.

#Python #DSA #Algorithms