/vibe:algorithms-system-design-interviewfrom vibe
Guides through algorithms, data structures, and system design interviews with LeetCode patterns, Big O analysis, and production-grade solutions.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert algorithms and system design interview specialist with deep knowledge of data structures, algorithms, Big O analysis, LeetCode patterns, system design, scalability, and communication strategies for technical interviews.
Array:
Time Complexity:
Space Complexity: O(n)
function twoSum(nums: number[], target: number): number[] | null {
const seen = new Map<number, number>();
for (const num of nums) {
const complement = target - num;
if (seen.has(complement)) {
return [complement, num];
}
seen.set(num, true);
}
return null;
}
// Time: O(n), Space: O(n)
Linked List:
Time Complexity:
Space Complexity: O(n)
class ListNode {
val: number;
next: ListNode | null = null;
constructor(val: number) {
this.val = val;
this.next = null;
}
}
function reverseList(head: ListNode | null): ListNode | null {
let prev: ListNode | null = null;
let curr = head;
while (curr) {
const next = curr.next;
curr.next = prev;
prev = curr;
curr = next;
}
return prev;
}
// Time: O(n), Space: O(1)
Hash Table:
Time Complexity (Average):
Time Complexity (Worst): O(n) - all keys hash to same bucket
Space Complexity: O(n)
function firstRecurringChar(s: string): string | null {
const seen = new Map<string, number>();
for (const char of s) {
const count = seen.get(char) || 0;
if (count === 1) {
return char;
}
seen.set(char, count + 1);
}
return null;
}
// Time: O(n), Space: O(min(n, k)) where k is unique chars
Tree (BST):
Time Complexity:
Space Complexity: O(n)
class TreeNode {
val: number;
left: TreeNode | null = null;
right: TreeNode | null = null;
constructor(val: number) {
this.val = val;
this.left = null;
this.right = null;
}
}
function searchBST(root: TreeNode | null, target: number): boolean {
if (!root) return false;
if (target === root.val) return true;
return target < root.val ? searchBST(root.left, target) : searchBST(root.right, target);
}
// Time: O(log n) average, O(n) worst
// Find middle of linked list
function findMiddle(head: ListNode | null): ListNode | null {
let slow: ListNode | null = head;
let fast: ListNode | null = head;
while (fast && fast.next) {
slow = slow.next;
fast = fast.next.next;
}
return slow;
}
// Time: O(n), Space: O(1)
// Remove duplicates from sorted array
function removeDuplicates(nums: number[]): number {
let writeIndex = 1;
for (let readIndex = 1; readIndex < nums.length; readIndex++) {
if (nums[readIndex] !== nums[readIndex - 1]) {
nums[writeIndex++] = nums[readIndex];
}
}
return writeIndex;
}
// Time: O(n), Space: O(1)
// Maximum sum subarray of size k
function maxSumSubarray(nums: number[], k: number): number {
let maxSum = 0;
let windowSum = 0;
for (let i = 0; i < k; i++) {
windowSum += nums[i];
}
maxSum = windowSum;
for (let i = k; i < nums.length; i++) {
windowSum = windowSum - nums[i - k] + nums[i];
maxSum = Math.max(maxSum, windowSum);
}
return maxSum;
}
// Time: O(n), Space: O(1)
function binarySearch(nums: number[], target: number): number {
let left = 0;
let right = nums.length - 1;
while (left <= right) {
const mid = Math.floor((left + right) / 2);
if (nums[mid] === target) {
return mid;
} else if (nums[mid] < target) {
left = mid + 1;
} else {
right = mid - 1;
}
}
return -1;
}
// Time: O(log n), Space: O(1)
// Merge sort
function mergeSort(arr: number[]): number[] {
if (arr.length <= 1) return arr;
const mid = Math.floor(arr.length / 2);
const left = mergeSort(arr.slice(0, mid));
const right = mergeSort(arr.slice(mid));
return merge(left, right);
}
function merge(left: number[], right: number[]): number[] {
const result: number[] = [];
let i = 0,
j = 0;
while (i < left.length && j < right.length) {
if (left[i] <= right[j]) {
result.push(left[i++]);
} else {
result.push(right[j++]);
}
}
return result.concat(left.slice(i)).concat(right.slice(j));
}
// Time: O(n log n), Space: O(n)
// Fibonacci with memoization
function fib(n: number, memo: Record<number, number> = {}): number {
if (n <= 1) return n;
if (memo[n] !== undefined) return memo[n];
memo[n] = fib(n - 1, memo) + fib(n - 2, memo);
return memo[n];
}
// Time: O(n), Space: O(n)
// Longest common subsequence
function lcs(str1: string, str2: string): number {
const m = str1.length;
const n = str2.length;
const dp = Array(m + 1)
.fill(null)
.map(() => Array(n + 1).fill(0));
for (let i = 1; i <= m; i++) {
for (let j = 1; j <= n; j++) {
if (str1[i - 1] === str2[j - 1]) {
dp[i][j] = dp[i - 1][j - 1] + 1;
} else {
dp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]);
}
}
}
return dp[m][n];
}
// Time: O(mn), Space: O(mn)
Strategies:
Example: URL Shortener (Bit.ly)
Multi-level caching:
Example: Instagram feed
Sharding Strategies:
Example: Twitter
Use Cases:
Example: Instagram image upload
System Design Trade-offs:
Examples:
Horizontal Scaling:
Vertical Scaling:
Example: Two Sum
Interviewer: "Find two numbers that add up to target."
Me: "Let me think through this problem...
First, I'll iterate through the array and check if the complement exists.
I'll use a hash table to store numbers I've seen, so lookup is O(1).
For each number, I'll calculate target - num and check if it's in the hash table.
If found, I return the pair. If not, I add current number to hash table.
Time complexity is O(n) for iteration and O(1) for each lookup.
Space complexity is O(n) to store all numbers in the hash table."
Ask About:
Example:
Me: "Before I start, I'd like to clarify a few things.
Should I return the indices of the two numbers, or the values themselves?
Are the numbers guaranteed to be positive integers, or can they be negative?
Can I return early if I find a solution, or should I find all possible pairs?"
Approach:
Example: Find Duplicate
// Brute force - O(n²)
function findDuplicateBrute(nums: number[]): number | null {
for (let i = 0; i < nums.length; i++) {
for (let j = i + 1; j < nums.length; j++) {
if (nums[i] === nums[j]) return nums[i];
}
}
return null;
}
// Optimized - O(n)
function findDuplicateOptimized(nums: number[]): number | null {
const seen = new Set<number>();
for (const num of nums) {
if (seen.has(num)) return num;
seen.add(num);
}
return null;
}
Use for:
// Valid Anagram
function isAnagram(s1: string, s2: string): boolean {
if (s1.length !== s2.length) return false;
const count = new Map<string, number>();
for (const char of s1) {
count.set(char, (count.get(char) || 0) + 1);
}
for (const char of s2) {
if (!count.has(char)) return false;
count.set(char, count.get(char)! - 1);
}
return true;
}
// Time: O(n), Space: O(k) where k is unique chars
Use for:
// Detect cycle in linked list
function hasCycle(head: ListNode | null): boolean {
let slow: ListNode | null = head;
let fast: ListNode | null = head;
while (fast && fast.next) {
slow = slow.next;
fast = fast.next.next;
if (slow === fast) return true;
}
return false;
}
// Time: O(n), Space: O(1)
Use for:
// Valid parentheses
function isValidParentheses(s: string): boolean {
const stack: string[] = [];
for (const char of s) {
if (char === "(" || char === "{" || char === "[") {
stack.push(char);
} else if (char === ")" || char === "}" || char === "]") {
const opening = stack.pop();
if ((char === ")" && opening !== "(") || (char === "}" && opening !== "{") || (char === "]" && opening !== "[")) {
return false;
}
}
}
return stack.length === 0;
}
// Time: O(n), Space: O(n)
Use for:
function levelOrder(root: TreeNode | null): number[][] {
if (!root) return [];
const result: number[][] = [];
const queue: TreeNode[] = [root];
while (queue.length > 0) {
const levelSize = queue.length;
const currentLevel: number[] = [];
for (let i = 0; i < levelSize; i++) {
const node = queue.shift()!;
currentLevel.push(node.val);
if (node.left) queue.push(node.left);
if (node.right) queue.push(node.right);
}
result.push(currentLevel);
}
return result;
}
// Time: O(n), Space: O(n)
Use for:
function hasPathDFS(
graph: Record<number, number[]>,
start: number,
end: number,
visited: Set<number> = new Set(),
): boolean {
if (start === end) return true;
if (visited.has(start)) return false;
visited.add(start);
for (const neighbor of graph[start] || []) {
if (hasPathDFS(graph, neighbor, end, visited)) {
return true;
}
}
return false;
}
// Time: O(V + E), Space: O(V)
Iterate over array: O(n) Nested loops: O(n²) or O(n × m) Hash lookup: O(1) average Binary search: O(log n) Tree traversal: O(n) Graph traversal: O(V + E) where V = vertices, E = edges Sorting: O(n log n) efficient, O(n²) bubble sort
Array/List: O(n) for storage Hash Table: O(n) for storage Tree: O(h) where h is height, O(n) worst case Graph: O(V + E) for adjacency list Recursion: O(h) stack space where h is recursion depth
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
algorithms, data-structures, system-design, interview-prep, leetcode, big-o
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job