agent/skills/knowledge/two-pointers/SKILL.md
Solve pair-sum, sliding window, and cycle detection problems with two pointers. Use when reducing O(n²) nested loops to O(n) on sorted or sequential data.
npx skillsauth add knoopx/pi two-pointersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Two pointers on a sorted array: start left=0, right=n-1, move inward based on comparison.
Two pointers: O(n). Sliding window: O(n). Fast/slow: O(n).
"Two sum on sorted" → left=0, right=n-1; if arr[left]+arr[right] < target: left++, else right--. "Longest substring without repeats" → expand right, shrink left when duplicate found.
tools
Inform the user what is happening — skip passive lookups
development
Renders markdown to self-contained HTML with a custom dark stylesheet and opens in browser. Use when previewing markdown documents, generating styled HTML from README or report files.
testing
Programmatic hunk selection for Jujutsu — split, commit, or squash specific hunks without interactive prompts. Use when making partial commits or selective squashes.
content-media
Manage version control with Jujutsu (jj) — no staging area, immediate changes, smart rebasing. Use when navigating history, squashing, or pushing to Git remotes.