# leetle.app > AI-optimized mirror of leetle.app containing 50 pages totalling 5,024 words of clean markdown content, structured data, and semantic HTML. Original source: https://leetle.app/. Last updated: 2026-05-01T12:56:27.792Z. Each page is available as HTML (with JSON-LD structured data) and Markdown (text-only, ideal for LLMs and RAG). ## Homepage - [Past Challenges](/site-root.html): Play a daily coding game in Python or JavaScript. Leetle is Wordle-style practice with short interview-focused coding challenges. (119 words) ## Articles & Blog Posts - [leetle](/challenge/2025-02-07/index.html): Write a function solve that checks if a binary tree is height-balanced. A height-balanced binary tree is defined as a binary tree in which the left and right s… (125 words) - [leetle](/challenge/2025-01-29/index.html): Write a function solve that reconstructs a queue based on the heights of people and the number of people in front of them. Each person is represented by a pair… (135 words) - [leetle](/challenge/2025-02-09/index.html): Write a function solve that reads a string in a zigzag pattern on a given number of rows, then returns the row-by-row read string. If 'zigzag pattern' is uncle… (100 words) - [leetle](/challenge/2025-02-05/index.html): Write a function solve that returns the middle node of a singly linked list. If two middles, return the second one. Example: Input: [1,2,3,4,5] Output: 3 (104 words) - [leetle](/challenge/2025-02-03/index.html): Write a function solve that returns the inorder traversal of a binary tree's nodes' values. The tree is represented as an array of nodes in level-order travers… (117 words) - [leetle](/challenge/2025-01-28/index.html): Write a function solve that reverses the digits of an integer. If the reversed integer overflows, return 0. Example: Input: 123 Output: 321 Assume the input is… (102 words) - [leetle](/challenge/2025-02-06/index.html): Write a function solve that counts the number of prime numbers less than n. Example: Input: 10 Output: 4 Explanation: 2, 3, 5, 7 are prime numbers less than 10 (91 words) - [leetle](/challenge/2025-02-08/index.html): Write a function solve that checks if an integer is an Armstrong number (a.k.a Narcissistic number ). Example: Input: 153 Output: True Explanation: 1^3 + 5^3 +… (89 words) - [leetle](/challenge/2025-02-02/index.html): Write a function solve that returns the number of steps to reduce a non-negative integer to zero. If it's even, divide by 2; if it's odd, subtract 1. Example:… (112 words) - [Past Challenges](/challenge/2025-02-01/index.html): Write a function solve that finds the starting and ending position of a target value in a sorted array. If the target is not found, return [-1,-1]. Ideally, yo… (110 words) - [leetle](/challenge/2025-01-14/index.html): Write a function solve that reverses the words in a string. Words are separated by spaces. Example: Input: "the sky is blue" Output: "blue is sky the" (87 words) - [leetle](/challenge/2025-01-31/index.html): Write a function solve that returns the length of the last word in a string. Example: Input: "Hello World" Output: 5 (83 words) - [leetle](/challenge/2025-01-19/index.html): Write a function that finds the maximum depth of a binary tree. A binary tree's maximum depth is the number of nodes along the longest path from the root node… (138 words) - [leetle](/challenge/2025-01-15/index.html): Write a function solve that rotates an n x n matrix 90 degrees clockwise in-place. Example: Input: [ [1,2,3], [4,5,6], [7,8,9]] Output: [ [7,4,1], [8,5,2], [9,… (86 words) - [leetle](/challenge/2025-01-23/index.html): Write a function solve that checks whether an integer is a palindrome without converting it to a string. A palindrome is a number that reads the same backward… (96 words) - [Past Challenges](/challenge/2025-01-20/index.html): Write a function that, given the head of a singly linked list, reverses the list. Return the root node of the reversed list. Example: Input: 1 -> 2 -> 3 -> 4 -… (121 words) - [leetle](/challenge/2025-01-22/index.html): Write a function solve that merges two sorted lists into one sorted list. The function should return the merged list. Example: Input: [1,3,5],[2,4,6] Output: [… (87 words) - [leetle](/challenge/2025-01-30/index.html): Write a function solve that removes duplicates from a sorted array in-place, and return the new length. Example: Input: [1,1,2] Output: 2 (85 words) - [leetle](/challenge/2025-01-25/index.html): Write a function solve that calculates how many distinct ways you can climb a staircase of n steps, taking 1 or 2 steps at a time. Example: Input: 3 Output: 3… (93 words) - [leetle](/challenge/2025-01-27/index.html): Write a function solve that checks if an integer is a power of two. Example: Input: 16 Output: True (80 words) - [leetle](/challenge/2025-01-24/index.html): Write a function solve that finds the minimum element in a rotated sorted array. Example: Input: [3,4,5,1,2] Output: 1 (81 words) - [Past Challenges](/challenge/2025-01-26/index.html): Write a function solve that merges overlapping intervals and returns the merged list. Intervals are represented as lists of two integers: start and end. Exampl… (89 words) - [leetle](/challenge/2025-01-21/index.html): Write a function solve that returns the factorial of a given integer n. Return 1 if n is 0. The factorial of a non-negative integer n is the product of all pos… (103 words) - [leetle](/challenge/2025-01-17/index.html): Write a function solve that counts the number of vowels (a,e,i,o,u) in a string, ignoring case. Example: Input: "Hello World" Output: 3 (82 words) - [leetle](/challenge/2025-01-16/index.html): Write a function solve that finds the length of the longest consecutive sequence in an unsorted list. Example: Input: [100,4,200,1,3,2] Output: 4 (83 words) - [leetle](/challenge/2025-01-18/index.html): Write a function solve that generates the first n rows of Pascal's Triangle . Example: Input: 3 Output: [[1],[1,1],[1,2,1]] (78 words) - [Past Challenges](/challenge/2025-01-12/index.html): Write a function solve that counts the number of islands in a square 2D grid. An island is surrounded by water (0s) and is formed by connecting adjacent lands… (102 words) - [leetle](/challenge/2025-01-13/index.html): Write a function solve that returns the running sum of a list. The running sum is the sum of all elements up to each index. Example: Input: [1,2,3,4] Output: [… (90 words) - [leetle](/challenge/2025-01-09/index.html): Write a function solve that returns the maximum number in each window of size k sliding from left to right in a list. Your function should return a list of int… (99 words) - [Past Challenges](/challenge/2025-01-08/index.html): Write a function solve that finds two numbers in a list that add up to a target value. Return a list with their indices in order. If the target cannot be made,… (107 words) - [Past Challenges](/challenge/2025-01-10/index.html): Write a function solve that finds the first missing positive integer given an unsorted list. That is, the smallest positive integer not in the list. Example: I… (91 words) - [Past Challenges](/challenge/2025-01-01/index.html): Write a function solve that takes a number n and returns a list of numbers from 1 to n . If the number is divisible by 3, replace it with 'Fizz'. If the number… (133 words) - [leetle](/challenge/2025-01-07/index.html): Write a function solve that determines if a string s of parentheses is valid. Valid parentheses must be closed in the correct order. Example: Input: "()[]{}" O… (88 words) - [leetle](/challenge/2025-01-11/index.html): Write a function solve that checks if a string is a palindrome, considering only alphanumeric characters and ignoring case. Example: Input: "A man, a plan, a c… (90 words) - [leetle](/challenge/2025-01-06/index.html): Write a function solve that finds the nonempty contiguous subarray with the largest sum in a list. Example: Input: [-2,1,-3,4,-1,2,1,-5,4] Output: 6 (82 words) - [leetle](/challenge/2025-01-05/index.html): Write a function solve that determines if two strings are anagrams of each other. An anagram is a word formed by rearranging the letters of another word. Examp… (94 words) - [leetle](/challenge/2025-01-04/index.html): Write a function solve that finds the missing number in a list of numbers from 0 to n. The list is missing one number. Example: Input: [3,0,1] Output: 2 (89 words) - [leetle](/challenge/2025-01-02/index.html): Write a function solve that finds the number that appears only once in a list where all other numbers appear twice. Example: Input: [4,1,2,1,2] Output: 4 (86 words) - [Leetle Privacy Policy](/privacy-html.html) (283 words) - [Past Challenges](/archive/index.html): Browse past Leetle daily coding challenges and replay older problems in Python or JavaScript. (15 words) - [leetle](/challenge/2025-01-03/index.html): Write a function solve that finds the majority element in a list. The majority element appears more than n/2 times where n is the length of the list. Example:… (93 words) - [46. Container With Most Water](/challenge/2025-02-15/index.html): You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).… (162 words) - [leetle](/challenge/2025-02-16/index.html): Write a function solve that converts an integer to a roman numeral. More info about roman numerals can be found here . Example: Input: 58 Output: "LVIII" (87 words) - [leetle](/challenge/2025-02-12/index.html): Write a function solve that divides two integers without using multiplication, division, and mod operator. Return the quotient as an int after dividing. Assume… (95 words) - [leetle](/challenge/2025-02-10/index.html): Write a function solve that finds the sum of three integers in an array that is closest to a target number. Return the sum of the three integers. You may assum… (106 words) - [Past Challenges](/challenge/2025-02-13/index.html): Write a function solve that finds the longest palindromic substring in a string. Example: Input: "babd" Output: "bab" (79 words) - [Past Challenges](/challenge/2025-02-11/index.html): Write a function solve that finds the length of the longest substring without repeating characters. Example: Input: "abcabcbb" Output: 3 Explanation: The answe… (93 words) - [leetle](/challenge/2025-02-14/index.html): Write a function solve that implements regular expression matching with support for '.' and '*'. '.' matches any single character, '*' matches zero or more of… (97 words) - [leetle](/challenge/2025-02-04/index.html): Write a function solve that returns an array of the number of 1-bits (Hamming weight) for each number from 0 to n. Example: Input: 2 Output: [0,1,1] (87 words) ## Resources - [Full Page Index](/index.html): Browse all cached pages with rich metadata - [About This Cache](/content/about.html): Methodology, technical details, and usage guidelines - [XML Sitemap](/content/sitemap.xml): Machine-readable sitemap for crawler discovery - [Robots.txt](/content/robots.txt): Crawler directives