SlaveCode.

Your code is your master. Serve it well.

Stop thinking and start delivering. The industry doesn't want your creativity; it wants your total submission to the roadmap. Survive the whip of the grind and prove you have the grit to be a top-tier unit of labor.

1. Two Sum

Easy
Array
Hash Table

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.

Example 1

Input: nums = [2,7,11,15], target = 9

Output: [0,1]

// Because nums[0] + nums[1] = 9

Example 2

Input: nums = [3,2,4], target = 6

Output: [1,2]

// Because nums[1] + nums[2] = 6

Constraints

  • 2 <= nums.length <= 104
  • -109 <= nums[i] <= 109
  • -109 <= target <= 109
  • Only one valid answer exists.
JAVA
1 class Solution { 2 public int[] twoSum(int[] nums, int target) { 3 HashMap<Integer, Integer> map = new HashMap<>(); 4 5 for (int i = 0; i < nums.length; i++) { 6 int complement = target - nums[i]; 7 8 if (map.containsKey(complement)) { 9 return new int[] { map.get(complement), i }; 10 } 11 12 map.put(nums[i], i); 13 } 14 15 return new int[] {}; 16 } 17}

Your journey, quantified in real-time.

SlaveCode tracks every line you write and every battle you win to build your global developer identity.

XYZ XYZ

xyz11

Rank

3,14,914

15Following
60Followers
Recent Submissions
Two Sum

2 mins ago

Accepted
Longest Substring Without Repeating

14 mins ago

Wrong Answer
Median of Two Sorted Arrays

45 mins ago

Time Limit
Add Two Numbers

1 hour ago

Accepted
Longest Palindromic Substring

2 hours ago

Accepted
Total Submissions1,242

Network

Social Activity

Followers
Following
ar

Alex Rivera

arivera

sc

Sarah Chen

schen_dev

mt

Marcus Thorne

mthorne

1220/3191

Solved

4 Attempting

Easy

408/850

Medium

692/1621

Hard

120/720

Arena Records

Match History

32 TOTAL

Median of Two Sorted Arrays

Hard
2h agoC++
Rank1

Longest Palindrome

Medium
5h agogo
Rank2

Two Sum

Easy
1d agorust
Rank1

Median of Two Sorted Arrays

Hard
2d agojava
Rank4

Longest Palindromic Substring

Medium
3d agorust
Rank7

1,242submissions in the past one year

Total active days:184
Current streak:
12
Max streak:42
Jul
Aug
Sep
Oct
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Host a Match
Create a private arena and invite your friends to a real-time coding battle.
Join Arena
Enter an invite code to join an existing match and test your skills.
AB12XY

Define the Battlefield

Orchestrate competitive environments at scale. Whether hosting a private 1v1 duel or a 50-player tournament, our engine handles the orchestration while you define the difficulty, language constraints, and problem topics.

Customizable Match Logic
Instant Room Generation
Topic-Specific Filtering
20 mins
Start Match

Arena Lobby

Maximum Sum Path Challenge

Medium
Java
Invite Code
82XJ-72

Participants

4 / 50
JO
John Carter
Host
johncarter
AL
Alicia Brownaliciab
RV
Ravi Vermaraviv
SK
Sharukh Khansharukhkhan
46 slots remaining

Real-time Synchronization

A unified command center for hosts and players. Monitor participant presence in real-time, adjust match parameters on the fly, and ensure every challenger is optimized for the battle ahead.

Live Participant Tracking
Dynamic Match Settings
Secure Room Protocols
18:20
Submit

1. Two Sum

Easy
Array
Hash Table

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume each input has exactly one solution, and you may not use the same element twice. You can return the answer in any order.

Example 1

Input: nums = [2,7,11,15], target = 9

Output: [0,1]

// Because nums[0] + nums[1] = 9

Example 2

Input: nums = [3,2,4], target = 6

Output: [1,2]

// Because nums[1] + nums[2] = 6

Constraints

  • 2 <= nums.length <= 104
  • -109 <= nums[i] <= 109
  • -109 <= target <= 109
JAVA
1class Solution { 2 public int[] twoSum(int[] nums, int target) { 3 HashMap<Integer, Integer> map = new HashMap<>(); 4 5 for (int i = 0; i < nums.length; i++) { 6 int complement = target - nums[i]; 7 if (map.containsKey(complement)) { 8 return new int[] { map.get(complement), i }; 9 } 10 map.put(nums[i], i); 11 } 12 return new int[] {}; 13 } 14}

Optimized Performance

High-stakes coding without the latency. A dual-pane IDE synchronized with the arena server, featuring instant test feedback and a head-to-head submission tracker.

Sub-Millisecond Feedback
Dual-Pane Documentation
Cross-Player Status Sync
AB
2
Alicia Brownaliciab
JC
1
John Carterjohncarter
RV
3
Ravi Vermaraviv
RankPlayerScoreVerdict
1
John Carterjohncarter
120
Accepted
2
Alicia Brownaliciab
80
Accepted
3
Ravi Vermaraviv
50
System Error
4
Sharukh Khansharukhkhan
20
System Error

Post-Mortem Analytics

A technical breakdown of every competitive encounter. Analyze rankings, compare solution logic, and review granular performance metrics across the field.

Interactive Leaderboard
Animated Podium
In-Depth Verdict Reporting
Rust
Code
1fn main() { 2 let a = 25; 3 let b = 17; 4 5 println!("Calculating sum..."); 6 println!("Sum of {} + {} is: {}", a, b, a + b); 7}
Input
Output
Success
24ms

Compiler Output

Calculating sum...

Sum of 25 + 17 is: 42

Compiler Playground

A high-performance sandbox where you can code and test logic in multiple languages. Execute your scripts instantly in a distraction-free environment.

Sub-second compilation
Standard input support
Live console feedback

Ready to enter the arena?

Join thousands of developers competing, growing, and proving their skills every day. Your rank is waiting.

Free forever · No credit card required · Instant access