Browse Topics
Filter challenges by technology & concept
All 256 Challenges
0 Solved#1Vital Assignment
Master parameters and basic arithmetic in a high-stakes scenario.
#2Dynamic Messaging
Learn to combine parameters and text into dynamic terminal messages.
#3The Comma Trick
Learn to use console.log() to print multiple values clearly without concatenation.
#4Value Reversal
Swap the contents of two variables using a temporary container.
#5Precision Area
Use constants for fixed mathematical values and solve geometric formulas with precision.
#6Operation Hierarchy
Master the order of operations to solve complex arithmetic expressions.
#7Equality Comparisons
Understand the difference between loose (==) and strict (===) equality.
#8The AND Operator
Combine multiple conditions using the logical AND (&&) operator.
#9Modulo Division
Learn to find the remainder of a division using the modulo (%) operator.
#10Compound Assignment
Use the += operator to update variables efficiently.
#11The NOT Operator
Use the Logical NOT (!) operator to flip boolean states.
#12Postfix Increment
Master the result of a postfix increment operation.
#13Prefix Increment
Observe how prefix increments update the value before use.
#14Exponentiation
Use the exponentiation (**) operator to calculate cube volumes.
#15Type Validation
Use typeof to verify data integrity before processing.
#16Temporal Extraction
Deconstruct total seconds into minutes and remainders.
#17Numeric Coercion
Convert numeric strings into numbers using the unary plus operator.
#18Integer Verification
Distinguish between whole numbers and floating-points.
#19Planetary Weight
Use constant variables to calculate weight on different worlds.
#20The Uncharted Void
Master the two fundamental "empty" types in JavaScript.
#21Shorthand Surge
Learn to declare multiple variables in a single line for cleaner code.
#22The OR Operator
Use logical OR (||) for fallback settings.
#23Nullish Coalescing
Use ?? for safer fallbacks that preserve falsy but valid values.
#24The Master XOR
Simulate the XOR (Exclusive OR) logical operation using only standard operators.
#25Truthiness Counter
Count how many values in a set are considered "truthy" using coercion.
#26Strictly Nullish
Identify strictly nullish values while ignoring other falsy values.
#27Short-Circuit Chain
Build a multi-level fallback chain using logical operator short-circuiting.
#28Safe Number Validator
Create a robust validator to identify "real" numbers in a sea of dynamic types.
#29Zero-Logic Toggle
Switch between two states (0 and 1) using pure arithmetic without any conditions.
#30The Coercion Trap
Detect when two values would result in an "equality trap" between == and ===.
#31Boolean Equality
Determine if two values of completely different types resolve to the same boolean truthiness.
#32De Morgan's Revenge
Simplify and solve complex negative boundary logic across multiple variables.
#33The NaN Guardian
Safely handle arithmetic failures and return controlled fallbacks.
#34The Signed Zero Identity
Detect the difference between positive and negative zero using mathematical limits.
#35Truthiness Normalizer
Convert any arbitrary value into a binary 1 or 0 based on its truthiness.
#36Type Integrity Guard
Build a robust type guard for checking non-empty string values.
#37Bitwise Parity
Check if a number is even or odd using bitwise logic for maximum efficiency.
#38Power of Two Guard
Identify powers of two using bitwise arithmeticโthe ultimate performance trick.
#39Precision Threshold
Handle floating-point errors by using a precision threshold (epsilon) for comparisons.
#40The Universal Fallback
Create a "Super Guard" that catches null, undefined, and NaN in a single logical chain.
#41Integer Extraction
Use the parseInt() function to explicitly convert string data into integers.
#42Corrupted Scans
Learn why NaN is a unique special value that is not equal to itself.
#44The Heat Sensor
Build a critical alert system that only triggers when the heat levels rise.
#45The Sky Guard
Handle the two destinies of any traveler: the umbrella or the sunshine.
#46The Rank Master
Judge the merit of the students and assign their definitive letter grade.
#47Gatekeeper's Vault
Guard the high palace with a two-layered verification check.
#48The Chronos Dial
Use the magical dial of the Chronos gate to jump to specific days in time.
#49The Continental Guard
Use the Logical OR operator to simplify checking multiple valid states at the border.
#50The VIP Gate
Use the Logical AND operator to ensure multiple conditions are perfectly met before entry.
#51The Quarter Master
Learn to group multiple switch cases together to share the same code logic.
#52The Gilded Entrance
Master the most concise way to write an if-else statement using the Ternary Operator.
#53The Adventurer's Rank
Sequence your range checks to determine where a traveler stands in the tiers of power.
#54The Olympic Oracle
Chain multiple ternary operators together to decide the fate of the three podium positions.
#55The Cryptic Threshold
Use layered validation checks to determine who may enter the restricted sanctuary.
#56The Signal Decoder
Decode numeric signals into human-readable messages using a switch statement.
#57The Ghost Signal
Use the Logical AND operator for an extremely concise conditional that only speaks when summoned.
#58The Void Scanner
Distinguish between different types of "nothingness" using a precise if-else if ladder.
#59The Domino Effect
Harness the gravity of the switch statement to trigger a chain reaction of messages.
#60The Vault Entrance
Use string properties to determine if a secret code is strong enough to enter the vault.
#61The Type-Safe Gate
Combine type checking and range validation to guard the sanctum from invalid data.
#62The Parity Pendulum
Use the Modulo operator and a Ternary to instantly categorize any number.
#63The Number Neutralizer
Perfectly categorize numbers into three logical zones: Positive, Negative, or Zero.
#64The Overlap Detector
Detect if two time intervals collide in a 1D space.
#65The Triangle Oracle
Validate the laws of geometry and classify three sides into a triangle type.
#66The Leap Year Sentinel
Implement the precise Gregorian calendar rules to identify leap years.
#67The Chronos Converter
Convert 24-hour time strings into a human-friendly AM/PM format.
#68The Royal Taxation
Navigate the complex brackets of the kings treasury to calculate progressive taxes.
#69The Quadrant Navigator
Map a point in the 2D plane to its specific quadrant or axis.
#70The ATM Alchemist
Solve the riddle of the perfect dispensation: can you provide exactly X dollars using only $20 and $50 bills?
#71The RPS Champion
Determine the winner of a Rock-Paper-Scissors duel using efficient decision paths.
#72The Permission Matrix
Evaluate a series of security flags and roles to determine if a secret file can be edited.
#73The Ternary Fizz
Implement the legendary FizzBuzz logic using strictly a single nested ternary expression.
#74The Defiant Guardian
The do-while loop is a stubborn machine that insists on running at least once, no matter the obstacles.
#75The Iteration Echo
Enforce a specific number of iterations using the do-while loop.
#76The Even Pulse
Use a while loop to filter and print the heartbeat of even numbers.
#77The Power Ascendant
Use a while loop to find the smallest power of 2 that surpasses a specific limit.
#78The Countdown Clock
DailyMaster the reverse iteration of a standard for loop to launch the logical rocket.
#79The Prime Breaker
Use the break statement to stop your search the moment a secret is revealed.
#80The Digit Dissolver
Dismantle a number digit by digit to find its secret mathematical sum.
#81The Triple Leap
Customize the step expression of your for loop to leap across the numeric timeline.
#82The Grid Architect
Master the power of nested iteration to conceptually map out a coordinate system.
#83The Table Weaver
Use nested while loops to generate a segment of the sacred multiplication table.
#84The Lone Pair
Use a break statement to stop an inner loop as soon as the first matching pair is found.
#85The Forbidden Zone
Use the continue statement to skip the diagonal coordinates in a coordinate plane.
#86The Divisibility Scanner
Use nested loops to identify which numbers in a range are divisible by 2 or 3.
#87The Factorial Forge
Calculate the factorial of a number using iterative logic. The engine of growth starts here.
#88The Fibonacci Sequence
Generate the famous sequence where each number is the sum of the two preceding ones.
#89The Prime Sentinel
Implement a highly efficient primality test to guard the gates of truth.
#90The Perfect Number
Search for numbers that equal the sum of their own proper divisors.
#91The Armstrong Ascent
Check if a number is narcissisticโequaling the sum of its own digits raised to a power.
#92The Binary Converter
Translate decimal integers into the sacred language of machines.
#93The Digit Reverser
Flip a number inside out using purely mathematical operations. No strings attached.
#94The GCD Navigator
Find the greatest common factor between two numbers using the ancient Euclidean path.
#95The LCM Link
Calculate the least common multiple of two numbers using their hidden GCD link.
#96The Collatz Conjecture
Trace the chaotic path of a number until it inevitably crashes back to unity.
#97The Square Root Estimator
Calculate the integer square root of a number using iterative approximation.
#98The Harshad Hunter
Detect if a number is divisible by the sum of its own digits.
#99The Prime Factorizer
Deconstruct a number into its prime components, the building blocks of math.
#100The Happy Number
Determine if a number belongs to the joyous group of integers that settles at 1.
#101The Power Function
Calculate X raised to the power of Y using repeated multiplication.
#102The Arithmetic Check
Determine if a series of outputs follows a consistent arithmetic jump.
#103The Geometric Check
Verify the exponential growth of a geometric sequence.
#104The Trailing Zeros
Count the number of trailing zeros in a factorial result without calculating the massive number.
#105The Divisor Count
Calculate the total number of divisors for a given integer.
#106The Lucky Seven
Count how many times the digit 7 appears in a specific number.
#107The Lucas Link
Generate the Lucas sequence, a cousin of Fibonacci starting with 2 and 1.
#108The Tribonacci Pulse
Step up the complexity by tracking three sequences at once.
#109The Digit Persistence
Find how many steps it takes to reduce a number to a single digit by multiplying its components.
#110The Automorphic Aura
Detect numbers whose square ends with the same digits as the number itself.
#111The Strong Number
Identify numbers equaling the sum of the factorials of their digits.
#112The Goldbach Conjecture
Test one of the oldest unsolved problems: can every even number be the sum of two primes?
#113The Sieve of Eratosthenes
Efficiently filter out the non-primes in a range using the ancient sieve method.
#114The Catalan Calculator
Compute the N-th Catalan number, a fundamental constant in counting permutations.
#115The Kaprekar Routine
Step into the persistence of 6174, the constant that pulls all 4-digit numbers into its orbit.
#116The Ramanujan Search
Discover a Taxicab number: the sum of two cubes in two different ways.
#117The Russian Peasant
Multiply large numbers using only doubling, halving, and addition.
#118The Division via Subtraction
Simulate division by repeatedly subtracting the divisor from the target.
#119The Abundant Number
Find the numbers whose sum of proper divisors overflows their own value.
#120The Deficient Number
Detect numbers whose internal divisors fall short of their own value.
#121The Smith Number
Compare the sum of a composite numbers digits with the digits of its prime factors.
#122The Ulam Sequence
Generate numbers that can be expressed as the sum of two distinct earlier terms in exactly one way.
#123The Lucky Survivor
Survive the iterative sieve process to become a Lucky Number.
#124The Emirp Sentinel
Detect primes that, when reversed, reveal a different prime number.
#125The Circular Prime
Verify primes that remain prime through every possible cyclic rotation of their digits.
#126The Pronic Navigator
Detect numbers that are the product of two consecutive integers.
#127The Hamming Weight
Count the number of active bits (set bits) in a numbers binary representation.
#128The Pascal Architect
Generate a specific row of Pascalโs Triangle using purely iterative logic.
#129The Floyd Triangle
Weave a triangle of increasing natural numbers.
#130The Vampire Hunt
Detect a Vampire Number: a composite number with two fangs containing exactly the same digits.
#131The Goldbach Triple
Solve for the triple prime sum: every odd number greater than 5 is the sum of three primes.
#132The Abundant Range
Scan a numeric range and count how many abundant numbers lie within.
#133The Root Convergence
Track how many iterations it takes to converge on a square root using a specific accuracy limit.
#134The Palindrome Sum
Repeatedly add a number to its reverse until a palindromic state is achieved.
#135The Magic Constant
WeeklyCalculate the magic sum of a standard N x N magic square.
#136The Peak of Chaos
Scan a range to find the number that produces the longest Collatz sequence.
#137Hollow Square Architect
Construct the perimeter of a square without filling the center.
#138The X-Factor Grid
Draw a cross (X) within a square grid using diagonal logic.
#139The Diamond Loom
Weave a perfectly symmetrical diamond using spaces and stars.
#140The Checkerboard Pulse
Generate an alternating binary grid (0 and 1) representing a checkerboard.
#141Floyd's Pyramid
Build a centered triangular pyramid of consecutive natural numbers.
#142The Hourglass Pattern
Trace the passage of time with a symmetrical hourglass of stars.
#143The Spiral Sum
Sum all numbers on the diagonal path of a spiral-filled N x N matrix.
#147Euler's Totient
Count the number of positive integers up to N that are relatively prime to N.
#148The Primorial Power
Calculate the product of the first N prime numbers.
#149Stern's Diatomic
Investigate the additive logic of Sternโs sequence.
#150Recaman's Sequence
Jump forward and backward across the number line while avoiding visited territory.
#151The Padovan Pulse
Calculate the Padovan sequence: a sequence defined by a three-back sum.
#152The Gray Code Pulse
Convert a standard integer into its reflected binary Gray code.
#153Sylvester's Sequence
Investigate one of the fastest growing sequences in mathematics.
#154The Farey Sequence
Generate irreducible fractions between 0 and 1 using the Farey property.
#155The Partition Count
Count how many ways a number can be formed by the sum of smaller integers.
#156The Great Prime Gap
Find the largest distance between two consecutive primes within a range.
#157The Score Summation
Use a loop to iterate through a list of scores and calculate the total.
#158The Daily Average
Calculate the average of a list of numeric values.
#159The Peak Score
Identify the highest value in a dataset using a comparison loop.
#160The Zero Floor
Find the minimum value in a dataset.
#161Frequency Pulse
Count how many times a specific target value appears in a datasetโfrom numbers to fruit names.
#162Even/Odd Score Split
Count the number of even and odd values in an array.
#163The Target Search
Find the first index where a target value appears.
#164Reverse Accumulator
Iterate through an array from last to first and collect values.
#165The Multiplier Effect
Calculate the product of all numbers in an array.
#166The Neighbor Difference
Calculate the sum of differences between consecutive elements.
#167The Spike Locator
Detect local maxima: elements that are strictly greater than both their neighbors.
#168Range Check
Verify if all elements fall within a specific numeric range.
#169First & Last
Retrieve the first and last elements of an array and calculate their sum.
#170Skip Iteration
Iterate through an array using a step factor (sum every Nth element).
#171Threshold Filter
Count how many values in the array are strictly greater than a threshold.
#172The Alternator
Iteratively combine elements using alternating addition and subtraction.
#173Peak Season
Find the index of the highest value in an array.
#174Value Scaling
Print every value in an array multiplied by a scalar factor.
#175The Unique Sieve
Detect duplicates by comparing each element against all elements that came before it.
#176The Merger Sum
Sum all elements across two separate arrays.
#177The Lost Coordinate
Find the single missing number in a sequence from 0 to N.
#178The Phantom Duplicate
Find the duplicate number in an array containing numbers from 1 to N-1.
#179The Silver Medal
Identify the second largest number in an array without sorting it.
#180Majority Vote
Find the element that appears more than N/2 times in an array.
#181Equilibrium Point
Find the index where the sum of elements on the left equals the sum of elements on the right.
#182The Stock Broker
Calculate the maximum profit possible from a single buy and sell operation.
#183Consecutive Streak
Identify the longest continuous sequence of 1s in a binary array.
#184Rotation Pulse
Rotate an array to the right by K steps.
#185The Zero Migrator
Relocate all zeros in an array to the end while maintaining the relative order of other elements.
#186Order Audit
Determine if an array is sorted in non-decreasing order.
#187Clean Slate
Remove duplicates from a sorted array in-place.
#188The Lone Survivor
Find the one number that doesnโt have a pair in an array where every other item repeats twice.
#189The Pair Seeker
Find two indices in an array that sum up to a specific target.
#190Intersection Point
Find common elements between two arrays.
#191The Union Set
Collect all unique elements from two arrays.
#192Pascal's Row
Calculate a specific row in Pascalโs Triangle.
#193Minimum Gap
Find the minimum absolute difference between any two elements in an array.
#194Peak Product
Find the maximum product of a contiguous subarray.
#195The Summit Element
Find an element that is strictly greater than its immediate neighbors.
#196Pair Matching Registry
Count how many unique pairs of elements sum up to a specific target.
#197The Duplicate Echo
Determine if any element repeats in an array using nested loops.
#198The Manual Pivot
Perform a left rotation by shifting every element manually using nested loops.
#199Identity Crisis
Determine if two arrays are strictly identical in length and content.
#200The Master Frequency Map
The Final Milestone: Count all occurrences in an array using a single-pass Object map.
#201Container With Most Water
Find two vertical lines that together with the x-axis form a container containing the most water.
#202Valid Palindrome
Check if an array is a palindrome (reads same forwards and backwards).
#203Reverse Vowels in Array
Reverse only the vowels in an array of characters.
#204Maximum Sum Subarray (Fixed)
Find the maximum sum of any contiguous subarray of size K.
#205Smallest Subarray for Sum
Find the minimum length of a contiguous subarray whose sum is greater than or equal to a target.
#206Product Except Self
Calculate products of all elements except the current one without using division.
#207The Triple Seeker
Find all unique triplets in an array that sum to zero.
#208Consecutive Ones III
Find the maximum longest consecutive sequence of 1s if you can flip at most K zeros.
#209Subarray Product Threshold
Count all contiguous subarrays where the product of elements is strictly less than K.
#210Trapping Rain Water
Calculate how much water the elevation map can trap after raining.
#211Matrix Summation
Sum all elements in a 2D array (Matrix).
#212Transpose Matrix
Flip a matrix over its main diagonal, switching row and column indices.
#213Spiral Matrix I
Traverse an M x N matrix in a spiral order.
#214Rotate Image
Rotate an N x N matrix 90 degrees clockwise in-place.
#215Set Matrix Zeroes
If an element in an M x N matrix is 0, set its entire row and column to 0.
#216Search in 2D Matrix
Search for a target value in an M x N matrix with sorted rows.
#217Diagonal Traverse
Traverse an M x N matrix in a diagonal order.
#218The Matrix Reshaper
Reshape an M x N matrix into a new R x C matrix.
#219Toeplitz Matrix
Verify if every diagonal from top-left to bottom-right has identical elements.
#220Lucky Numbers in Matrix
Find all "lucky" numbers: elements that are minimum in their row and maximum in their column.
#221Find All Duplicates
Find all elements that appear twice in an array of size N containing values from 1 to N.
#222Nearby Duplicates
Check if an array contains duplicate elements within distance K.
#223The Anagram Archive
Group and categorize an array of strings by their anagram signatures.
#224Consecutive Chain
Find the length of the longest consecutive elements sequence in an unsorted array.
#225The Subset Audit
Verify if one array is a subset of another.
#226First Missing Positive
Find the smallest positive integer (greater than 0) that is missing from an unsorted array.
#229Subarray Sum Pulse
Count the total number of contiguous subarrays whose sum equals K.
#232The Dutch Flag Sort
Sort an array of 0s, 1s, and 2s in a single pass without using a sorting library.
#233The Merge Foundry
Merge two sorted arrays into a single sorted array without using the sort() method.
#236The Kth Selection
Find the Kth largest element in an unsorted array.
#240Mountain Peak Index
Find the index of the peak element in a mountain array using Binary Search.
#241Next Greater Element I
Find the first greater element to the right of each element in a subset.
#243Kadane's Algorithm
Find the contiguous subarray with the largest sum in O(n) time.
#250The Great Histogram
The 250th Milestone Case: Find the largest rectangle area in a histogram.
#251The Stack Protocol (LIFO)
Implement basic Last-In-First-Out (LIFO) operations using a standard array.
#252The Queue Protocol (FIFO)
Implement basic First-In-First-Out (FIFO) operations using a standard array.
#253The Syntactic Shield
Determine if a string of brackets is valid using a stack.
#254The Constant Min Stack
Design a stack that supports retrieving the minimum element in constant time O(1).
#255The Circular Array
Implement a circular queue using manual pointers to reuse space in a fixed-size array.
#257Sliding Window Maximum
Find the maximum in each sliding window of size K using an optimal monotonic queue.
#260Asteroid Collision
Simulate asteroid collisions in space using a stack.
#261Daily Temperatures
Find how many days you must wait for a warmer temperature using a monotonic stack.
#262Backspace String Compare
Determine if two strings are equal after backspace (#) processing.
#265Unix Path Simplifier
Convert a complex Unix file path into its canonical normalized form using a stack.
#271The Bubble Up
Implement the Bubble Sort algorithm by repeatedly swapping adjacent elements.
#272The Minimum Anchor
Implement Selection Sort by finding the minimum element and moving it to the front.
#273The Playing Cards Sort
Implement Insertion Sort by building a sorted array one element at a time.
#274Divide & Conquer: Quick Sort
Implement Quick Sort using pivot selection and recursive partitioning.
#275Divide & Conquer: Merge Sort
Implement Merge Sort by splitting the array into halves, sorting them, and merging them back.
#277Linear Velocity: Counting Sort
Sort an array of small integers in O(n + k) time by counting frequencies.
#301The Cartographer: Adj Matrix
Convert an edge list into an adjacency matrix to represent a graph.
#302The Signal Cascade (BFS)
Perform Breadth-First Search (BFS) starting from node 0 to explore the graph level by level.
#303The Deep Dive (DFS)
Perform Depth-First Search (DFS) starting from node 0 to explore as far as possible along each branch.
#310The Dijkstra Protocol
Find the shortest path from node 0 to all other nodes in a weighted graph.
#315The Archipelago Count
Count the number of separate "islands" of 1s in a 2D binary grid.
#326The Stealthy Thief
Determine the maximum amount of money you can rob without alerting the police by avoiding adjacent houses.
#327The Infinite Climb
Find how many unique ways you can climb N stairs if you can take 1 or 2 steps at a time.
#330The Common Thread (LCS)
Find the length of the longest common subsequence between two strings.
#341The Semantic Split
Determine if a string can be segmented into a space-separated sequence of one or more dictionary words.
#342The Change Machine
Find the fewest number of coins that you need to make up a specific total amount.