VALHALLA
Practice like
The real Interview

Multi-level coding challenges, system design, and AI-enabled problem solving — built by the community, for REAL interviews and practice.

Code Editor

Monaco-powered IDE in your browser

Write, run, and test your solutions with the same editor that powers VS Code. Syntax highlighting, instant test execution, and real-time feedback on every submission.

Two Sum · Medium
Two Sum Medium
Problem Discussion

Given an array of integers nums and an integer target, return indices of the two numbers that add up to target.

You may assume each input has exactly one solution, and you may not use the same element twice.

Example

Input: nums = [2,7,11,15], target = 9
Output: [0,1]
Explanation: nums[0] + nums[1] = 9

Constraints

2 ≤ nums.length ≤ 104

solution.pytests
1def twoSum(nums, target): 2 seen = {} 3 for i, n in enumerate(nums): 4 diff = target - n 5 if diff in seen: 6 return [seen[diff], i] 7 seen[n] = i
Console Test Results Submissions
Click "Run Code" to execute...
Example 112ms
Example 28ms
Hidden test5ms
All 3 tests passed
No submissions yet. Run your code first.
Multi-Level

Progressive challenges that build on each level

OA-style problems where each level adds complexity. Start with the basics, unlock harder levels as you go — just like the real online assessments.

In-Memory Database · Hard
2 Transactions
Level 2 / 4
Add transaction support
Implement BEGIN, COMMIT, and ROLLBACK operations
Level 1 · Basic GET/SET/DELETEDone
2Level 2 · TransactionsCurrent
3Level 3 · Nested transactionsLocked
4Level 4 · Expiry & persistenceLocked
solution.pytest_db.pyREADME.md
class Database: def begin(self): # Start a new transaction pass def commit(self): pass def rollback(self): pass
Console Test Results Submissions
Click "Run Code" to execute...
AI-Enabled

Practice with AI like the real thing

Modern interviews let you use AI tools. Practice that way here — get real-time hints, approach guidance, and complexity analysis as you solve.

Word Guessing Game · Medium
Files
PYgame.py
PYtests.pyread-only
Part 1 Debug
game.py
1class WordGame: 2 def __init__(self, word): 3 self.secret_word = word.lower() 4 self.guessed = set() 5 self.wrong = 0 6 7 def guess(self, letter): 8 letter = letter.lower() 9 self.guessed.add(letter) 10 if letter in self.secret_word: 11 return "correct" 12 self.wrong += 1 13 return "wrong"
Console Test Results AI Submissions
U
3 tests are failing. The losing condition seems off — can you check?
Thinking...
Looking at get_status(). The condition wrong_guesses > max_wrong uses > but should be >=. Also get_remaining_guesses has an off-by-one.

I see two bugs in game.py:

1. get_status() line 125 — should be >= not >:

if self.wrong_guesses >= self.max_wrong:
    return "lost"

2. get_remaining_guesses() has an off-by-one:

return self.max_wrong - self.wrong_guesses

Fix both and the tests should pass.

Why >= matters? Third bug?
System Design

Whiteboard-style architecture practice

Design systems with guided sections, draw architecture diagrams, and get AI-powered evaluation on your approach — from load balancers to databases.

Design DoorDash
2 Architecture
How To Your Answer Feedback
Draw the architectureSketch the main components: mobile/web clients, API gateway, microservices, databases, and message queues.
Show data flowUse arrows to show how an order flows from the customer through the system. Label protocols (HTTP, gRPC).
Consider scalePeak dinner hours drive 10x traffic. Where do you add caching? What needs async processing?
Your work is on the canvas
Draw your architecture diagram on the right
No feedback yet
Click Check to get AI evaluation
HTTP gRPC events Mobile App iOS / Android Web App React API Gateway Load Balancer Order Service core logic Restaurant Svc menus & status Redis cache PostgreSQL primary DB Kafka event bus Notifications push / SMS Analytics dashboards
85Good

Strengths:

Clean microservice separation. Good use of event-driven architecture with Kafka for async workflows. Redis caching for menu/restaurant data is solid.

Areas to improve:

Consider a dedicated delivery matching service. Add a payment service between order and restaurant. WebSocket for real-time order tracking.

50+
Coding Problems
4-Level
Progressive Challenges
AI
Enabled Coding
System
Design Practice
Monaco
Code Editor

Create & share your own

Practice problems built by the community. Create your own — keep them private or share them with everyone.

Your problems,
your way

Build custom coding challenges with test cases, hints, and solutions. Use them for your own practice, share with your team, or contribute to the public problem bank.

Write problems with starter code, test cases, and multi-level support
Toggle visibility — private for personal use, public for the community
Tag with difficulty, topics, and interview format — OA, live coding, take-home
New Problem
PrivatePublic
Title
Rate Limiter
Difficulty
Medium
Levels
3
Starter Code
class RateLimiter: def __init__(self, limit): pass
Tags
DesignHash MapOA-StyleAlgorithms

Prepare for any process

Different companies interview differently. Valhalla covers the formats you'll actually encounter.

Big Tech Interviews

Algorithm-heavy rounds with follow-up questions and complexity analysis. Multi-level problems that build in difficulty.

AlgorithmsData StructuresMulti-Level

AI Lab & Startup Interviews

Modern formats including AI-enabled coding rounds where you can use tools, and production-style system design.

AI-EnabledSystem DesignProduction-Style

Online Assessments

Timed OA-style challenges with progressive difficulty, hidden test cases, and automated scoring — just like the real thing.

OA-StyleTimedHidden Tests

Start practicing today

Community-contributed problems covering the CS concepts and patterns that matter most in modern technical interviews.

Get Started

All problems are based on common CS concepts. Company tags are community-reported. Terms