Skip to content
difficulty

Beginner

Articles whose authoritative difficulty is beginner.

Tagged articles

Beginner articles

30 articles in this tag.

Lush green pine tree with a vibrant blue sky background, perfect for nature-themed projects.
beginner
11 min read

Add Binary

You receive two binary strings, a and b, and must return their sum as another binary string. The inputs contain only '0' and '1', have lengths from 1 to…

View solution
Close-up of a craftsman using an angle grinder, emitting sparks in a metal workshop.
beginner
9 min read

Balanced Binary Tree

A reliable Balanced Binary Tree solution carries two facts upward from every subtree: its height and whether it is balanced.

View solution
Smartphone displaying AI app with book on AI technology in background.
beginner
10 min read

Binary Tree Inorder Traversal

The difficult part of inorder traversal is not remembering “left, node, right.” It is preserving the parent node while the left subtree is still…

View solution
Sunlit forest scene with a tree trunk and fallen leaves in autumn ambiance.
beginner
9 min read

Climbing Stairs

The reliable way to solve Climbing Stairs is to stop guessing “Fibonacci” and ask one structural question: what could the final move have been?

View solution
Expansive desert landscape with sparse vegetation under a clear blue sky, capturing the arid beauty.
beginner
9 min read

Length of Last Word

The final character may be a space, so the right edge of the string is not necessarily part of the answer. The clean Length of Last Word solution is a…

View solution
An artistic arrangement of golden gears on a dark backdrop, symbolizing mechanics and cooperation.
beginner
9 min read

Longest Common Prefix

The trap is to compare whole strings before identifying the stopping condition. The answer ends at the first column where agreement breaks—or when the…

View solution
Dynamic abstract depiction of digital circuits with vivid lights and glowing lines.
beginner
9 min read

Maximum Depth of Binary Tree

The cleanest way to solve this problem is to stop counting depth globally. Ask each subtree for its answer, then let the parent combine those answers.

View solution
Close-up of a digital interface showcasing futuristic graphs and data analytics in low light.
beginner
8 min read

Merge Sorted Array

A left-to-right merge can overwrite values in nums1 before you have compared them. The reliable Merge Sorted Array solution uses backward two pointers:…

View solution
Group of high school students focused on learning in a computer lab setting.
beginner
10 min read

Merge Two Sorted Lists

The common failure mode here is treating linked lists like arrays: copy the values, sort them, and rebuild. That throws away the structure the problem…

View solution
A basket with dried yellow flowers and herbs on a table, ideal for tea or decoration.
beginner
10 min read

Palindrome Number

A full reverse is easy to write. The interview-level move is to stop reversing when the two halves meet.

View solution
Modern minimalist workspace with a laptop, ceramic mug, and glass water bottle on a white surface.
beginner
9 min read

Pascal's Triangle II

The requested output is one row, not the entire triangle. Build that row with one working list, and update it from right to left so each calculation still…

View solution
A workspace featuring a laptop covered in colorful sticky notes with a green plant on a white desk.
beginner
10 min read

Pascal's Triangle

The output looks like mathematics. The interview task is simpler: build each row from the row you already have.

View solution
A top view on charts and smartphone in an office, showcasing data analytics.
beginner
10 min read

Path Sum

A matching sum at an internal node is not enough. The path must start at the root, end at a leaf, and satisfy the target at that boundary.

View solution
Business professionals reviewing analytics on a tablet during a meeting.
beginner
9 min read

Plus One

Adding one looks trivial until the last digit is 9. Then the problem becomes a compact state-tracking exercise: start where arithmetic begins, propagate a…

View solution
Professional business meeting with presentation and data analytics on whiteboard.
beginner
8 min read

Remove Element

The array is not shortened. The judge inspects only a prefix, so the job is to compact the values you keep into that prefix and return its length.

View solution
Close-up of a blue screen error shown on a data center control terminal.
beginner
10 min read

Roman to Integer

Adding every Roman symbol works for LVIII, but it turns IV into 6. The reliable Roman to Integer solution is a left-to-right scan with one local question:…

View solution
Bright geometric pattern on a fence with green and white circles against a blue sky.
beginner
10 min read

Same Tree

A tree comparison fails the moment you forget that a missing child is also part of the structure.

View solution
High-tech laboratory equipment with computer system in lab setting.
beginner
10 min read

Search Insert Position

This problem asks for more. If the target is absent, return the index where it could be inserted while keeping the array sorted.

View solution
Monochrome image of a laptop, camera, lens, and coffee cup on a wooden desk
beginner
10 min read

Sqrt(x)

The fastest way to solve this problem is to stop searching for a square root and search for the last integer that is still feasible.

View solution
Close-up of colored pencils on an analytics report for education or business purposes.
beginner
10 min read

Subsets

The recursive code for subsets is short. The reasoning behind it is the part worth learning: every input element creates one independent choice—include it…

View solution
Dynamic abstract image of vibrant green light trails in motion, creating a futuristic feel.
beginner
10 min read

Symmetric Tree

The key to the Symmetric Tree solution is to compare two nodes as a mirror pair, not to traverse the left and right subtrees independently.

View solution
A dark-themed chat interface displaying an AI assistant conversation starter on a screen.
beginner
7 min read

Two Sum

A strong Two Sum solution replaces repeated pair scanning with one sharper question: has the array already shown us the value this number needs?

View solution
Detailed view of a computer screen displaying code with a menu of AI actions, illustrating modern software development.
beginner
9 min read

Valid Parentheses

Counting brackets tells you how many openings and closings exist. A stack tells you whether they close in the only order that nesting allows.

View solution