📰 Dev.to · tracelit
Articles from Dev.to · tracelit · 129 articles · Updated every 3 hours · View all reads
All
⚡ AI Lessons (10201)
ArXiv cs.AIDev.to · FORUM WEBDev.to AIForbes InnovationOpenAI NewsHugging Face Blog

Dev.to · tracelit
4d ago
LeetCode 230: Kth Smallest Element In A Bst — Step-by-Step Visual Trace
Find the kth smallest element in a Binary Search Tree (BST), where k is 1-indexed. The function should return the value of the kth smallest node when all nodes

Dev.to · tracelit
4d ago
LeetCode 703: Kth Largest Element In A Stream — Step-by-Step Visual Trace
Design a class that efficiently finds the kth largest element in a stream of integers, where new values are continuously added and we need to return the kth lar

Dev.to · tracelit
4d ago
LeetCode 875: Koko Eating Bananas — Step-by-Step Visual Trace
Find the minimum eating speed (bananas per hour) such that Koko can eat all banana piles within h hours, where she can only eat from one pile per hour.

Dev.to · tracelit
4d ago
LeetCode 45: Jump Game Ii — Step-by-Step Visual Trace
Find the minimum number of jumps needed to reach the last index of an array, where each element represents the maximum jump length from that position.

Dev.to · tracelit
4d ago
LeetCode 226: Invert Binary Tree — Step-by-Step Visual Trace
Given the root of a binary tree, invert the tree by swapping the left and right children of every node, and return the root of the inverted tree.

Dev.to · tracelit
4d ago
LeetCode 208: Implement Trie Prefix Tree — Step-by-Step Visual Trace
Implement a Trie (prefix tree) data structure that supports inserting words, searching for complete words, and checking if any words start with a given prefix.

Dev.to · tracelit
4d ago
LeetCode 198: House Robber — Step-by-Step Visual Trace
Given an array of non-negative integers representing the amount of money in each house, determine the maximum amount you can rob without robbing two adjacent ho

Dev.to · tracelit
4d ago
LeetCode 202: Happy Number — Step-by-Step Visual Trace
Determine if a number is happy by repeatedly replacing it with the sum of the square of its digits until it equals 1 (happy) or loops endlessly in a cycle (not

Dev.to · tracelit
4d ago
LeetCode 846: Hand Of Straights — Step-by-Step Visual Trace
Determine if you can rearrange a hand of cards into groups where each group has exactly W cards forming consecutive sequences.

Dev.to · tracelit
4d ago
LeetCode 261: Graph Valid Tree — Step-by-Step Visual Trace
Given n nodes and a list of undirected edges, determine if the edges form a valid tree. A valid tree must be connected and have exactly n-1 edges with no cycles

Dev.to · tracelit
4d ago
LeetCode 134: Gas Station — Step-by-Step Visual Trace
Find the starting gas station index from which you can complete a circular trip, where each station has gas to collect and cost to travel to the next station.

Dev.to · tracelit
4d ago
LeetCode 295: Find Median From Data Stream — Step-by-Step Visual Trace
Design a data structure that supports adding integers from a data stream and finding the median of all elements added so far in constant time.

Dev.to · tracelit
4d ago
LeetCode 271: Encode And Decode Strings — Step-by-Step Visual Trace
Design an algorithm to encode a list of strings into a single string, then decode it back to the original list of strings. The encoded string should handle edge

Dev.to · tracelit
4d ago
LeetCode 115: Distinct Subsequences — Step-by-Step Visual Trace
Given two strings s and t, return the number of distinct subsequences of s which equals t. A subsequence is formed by deleting some characters without changing

Dev.to · tracelit
4d ago
LeetCode 543: Diameter Of Binary Tree — Step-by-Step Visual Trace
Find the diameter of a binary tree, which is the length of the longest path between any two nodes in the tree. The path may or may not pass through the root.

Dev.to · tracelit
4d ago
LeetCode 211: Design Add And Search Words Data Structure — Step-by-Step Visual Trace
Design a data structure that supports adding words and searching for words with wildcard ''.'' characters that can match any single letter.

Dev.to · tracelit
4d ago
LeetCode 739: Daily Temperatures — Step-by-Step Visual Trace
Given an array of daily temperatures, return an array where each element represents how many days you have to wait until a warmer temperature. If there is no fu

Dev.to · tracelit
4d ago
LeetCode 210: Course Schedule Ii — Step-by-Step Visual Trace
Given a number of courses and their prerequisites, return the order in which courses should be taken to complete all courses, or an empty array if impossible du

Dev.to · tracelit
4d ago
LeetCode 338: Counting Bits — Step-by-Step Visual Trace
Given an integer n, return an array where the i-th element represents the number of 1-bits in the binary representation of integer i for all numbers from 0 to n

Dev.to · tracelit
4d ago
LeetCode 217: Contains Duplicate — Step-by-Step Visual Trace
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.

Dev.to · tracelit
4d ago
LeetCode 11: Container With Most Water — Step-by-Step Visual Trace
Given an array of heights representing vertical lines, find two lines that together with the x-axis form a container that can hold the most water.

Dev.to · tracelit
4d ago
LeetCode 39: Combination Sum — Step-by-Step Visual Trace
Find all unique combinations of candidates where the candidate numbers sum to target, where each number may be used multiple times.

Dev.to · tracelit
4d ago
LeetCode 40: Combination Sum Ii — Step-by-Step Visual Trace
Find all unique combinations from a given array of candidates where each number can be used only once and the sum equals the target value.

Dev.to · tracelit
4d ago
LeetCode 518: Coin Change Ii — Step-by-Step Visual Trace
Given an array of coin denominations and a target amount, find the number of different combinations of coins that make up that amount.
DeepCamp AI