129 articles

📰 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
LeetCode 226: Invert Binary Tree — Step-by-Step Visual Trace
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.
LeetCode 208: Implement Trie Prefix Tree — Step-by-Step Visual Trace
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.
LeetCode 198: House Robber — Step-by-Step Visual Trace
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
LeetCode 202: Happy Number — Step-by-Step Visual Trace
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
LeetCode 846: Hand Of Straights — Step-by-Step Visual Trace
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.
LeetCode 261: Graph Valid Tree — Step-by-Step Visual Trace
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
LeetCode 134: Gas Station — Step-by-Step Visual Trace
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.
LeetCode 295: Find Median From Data Stream — Step-by-Step Visual Trace
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.
LeetCode 271: Encode And Decode Strings — Step-by-Step Visual Trace
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
LeetCode 115: Distinct Subsequences — Step-by-Step Visual Trace
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
LeetCode 543: Diameter Of Binary Tree — Step-by-Step Visual Trace
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.
LeetCode 211: Design Add And Search Words Data Structure — Step-by-Step Visual Trace
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.
LeetCode 739: Daily Temperatures — Step-by-Step Visual Trace
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
LeetCode 210: Course Schedule Ii — Step-by-Step Visual Trace
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
LeetCode 338: Counting Bits — Step-by-Step Visual Trace
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
LeetCode 217: Contains Duplicate — Step-by-Step Visual Trace
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.
LeetCode 11: Container With Most Water — Step-by-Step Visual Trace
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.
LeetCode 39: Combination Sum — Step-by-Step Visual Trace
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.
LeetCode 40: Combination Sum Ii — Step-by-Step Visual Trace
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.
LeetCode 518: Coin Change Ii — Step-by-Step Visual Trace
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.