Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

875 challenges 536 easy 303 medium 36 hard
Lists & Arrays easy

Move Zeros to the End

Reorder a list in-place, pushing all zeros to the end while preserving the order of non-zero numbers.

lists in-place two-pointer
+10 pts 15m
Lists & Arrays easy

Find Missing Number 1 to n

Given a list containing n-1 distinct integers from 1 to n, find the missing number without using extra space.

arrays math search
+10 pts 10m
Lists & Arrays easy

Difference of Consecutive Elements

Given a list of numbers, return a new list where each element is the difference between consecutive elements.

list iteration math
+8 pts 10m
Lists & Arrays easy

Find Second Largest

Find the second largest unique number in a list, or None if it doesn't exist.

sorting max unique
+10 pts 10m
Lists & Arrays medium

Find Duplicate Number

Given a list of n+1 integers in the range 1..n, find the one integer that appears more than once.

arrays hash-set duplicates
+20 pts 25m
Lists & Arrays easy

Rearrange Positives and Negatives

Write a function that rearranges a list in-place so all negative numbers come before non-negative numbers.

in-place two-pointers partition
+10 pts 15m
Lists & Arrays medium

Two Missing Numbers

Given a list of n-2 unique integers from 1 to n, find the two missing numbers efficiently.

missing-numbers arrays math
+25 pts 25m
Lists & Arrays medium

Three Missing Numbers

Find the three missing numbers from a shuffled list containing all but three integers from 1 to n.

arrays sets missing
+15 pts 15m
Lists & Arrays medium

Count Smaller Numbers

Given an integer list, return for each position how many later elements are smaller than it.

arrays counting merge-sort
+20 pts 20m
Lists & Arrays easy

Convert Binary Number List

Given a list of bits (0s and 1s) in most-significant-first order, return the equivalent integer value.

binary lists conversion
+8 pts 10m
Lists & Arrays easy

Intersection two lists length

Return the number of distinct elements that appear in both input lists.

lists sets intersection
+8 pts 10m
Lists & Arrays easy

Normalize Array to Zero-One Range

Implement a function that normalizes a list of numbers to the range [0,1] using min-max scaling.

arrays normalization scaling
+8 pts 12m
Lists & Arrays easy

Rolling Window Mean

Given a list of numbers and a window size k, return a list of the means of every contiguous subarray of length k.

sliding-window lists averaging
+10 pts 12m

Showing 13 challenges · Lists & Arrays

Lists & Arrays — Python coding challenges

What you will find here

This page lists lists & arrays challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.

Challenges vs tutorials and quizzes

Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.