2 Followers
22 Following
229 Posts

Day 10/60: String operations in JS

Today's note was about making string operations in js work with JavaScript strings, indexing, and character handling without losing correctness. I kept coming back to the same checks: decide early whether indexing, slices, or character arrays are the right representation in JavaScript, keep the transformation or scan state explicit instead of mixing index tricks together, and use string and array helpers deliberately so character handling does not become accidental.

The failure mode worth watching is mixing index assumptions and character handling without checking what the string API actually returns. If that happens, the implementation usually looks busy while the invariant is already gone.

#JavaScript #DSA #Algorithms

Day 10/60: String handling in Rust

Today's note was about making string handling in rust work with Rust slices, strings, and indices without losing correctness. I kept coming back to the same checks: decide early whether bytes, chars, or slices are the right representation in Rust, keep the transformation or scan state explicit instead of mixing index tricks together, and use iterators and owned buffers deliberately so UTF-8 handling does not become accidental.

The failure mode worth watching is mixing byte indexing and character assumptions in UTF-8 text. If that happens, the implementation usually looks busy while the invariant is already gone.

#RustLang #DSA #Algorithms

Day 10/75: Sliding window - variable size

Today's note was about using a stable invariant so sliding window - variable 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 10/75: Sliding window - variable size

Today's note was about using a stable invariant so sliding window - variable 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 10/75: Sliding window - variable size

Today's note was about using a stable invariant so sliding window - variable 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 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