function fibonacci(n) { if (n <= 1) return n; return fibonacci(n - 1) + fibonacci(n - 2); }
function binarySearch(arr, target) { let left = 0; let right = arr.length - 1; while (left <= right) { const mid = Math.floor((left + right) / 2); if (arr[mid] === target) return mid; if (arr[mid] < target) left = mid + 1; else right = mid - 1; } return -1; }
function mergeSort(arr) { if (arr.length <= 1) return arr; const mid = Math.floor(arr.length / 2); const left = mergeSort(arr.slice(0, mid)); const right = mergeSort(arr.slice(mid)); return merge(left, right); } function merge(left, right) { const result = []; let i = 0, j = 0; while (i < left.length && j < right.length) { if (left[i] < right[j]) { result.push(left[i++]); } else { result.push(right[j++]); } } return [...result, ...left.slice(i), ...right.slice(j)]; }
function dfs(graph, start, visited = new Set()) { visited.add(start); console.log(start); for (const neighbor of graph[start]) { if (!visited.has(neighbor)) { dfs(graph, neighbor, visited); } } return visited; }
Your personalized online notebook
for everything LeetCode
Track, organize, and master coding problems with an intelligent platform that adapts to your learning style and helps you retain knowledge longer
Ace the Technical Interview at Top Companies
Supercharge Your Leetcode Practice
Repcode combines intelligent tracking, AI assistance, and proven learning techniques to help you master algorithms and data structures.
AI Code Review
Get instant feedback on your solutions with our AI-powered code review system.
Spaced Repetition
Fully customizable spaced repetition system to help you retain knowledge longer.

Direct LeetCode Sync
Sync problems directly from LeetCode without sharing your account information.
Detailed Insights
Track your progress with comprehensive statistics and performance analytics.
Organize and Customize Everything
No more excel spreadsheets! Use our friendly and intuitive UI to store, organize, and customize Leetcode problems
- Group problems by algorithm type or data structure
- Track performance metrics and view personalized statistics
- Filter and sort to find exactly what you need
- Import problem sets directly from Leetcode
Algorithm Problems
6 problemsProblem Name | Difficulty | Type |
---|---|---|
Two Sum | Easy | Review |
Valid Parentheses | Easy | Learning |
Merge Two Sorted Lists | Easy | New |
Maximum Subarray | Medium | Review |
LRU Cache | Medium | Learning |
Merge k Sorted Lists | Hard | New |
Solve problems with our custom all-in-one interface
Our integrated coding environment makes it easy to understand, solve, and review Leetcode problems all in one place.
- Split-panel interface with problem description and code editor
- Built-in AI assistant to help when you get stuck
- Save personal notes and solutions for future reference
- Support for multiple programming languages
Two Sum
Problem Description
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]
Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].
Example 2:
Input: nums = [3,2,4], target = 6
Output: [1,2]
Constraints:
2 <= nums.length <= 104
-109 <= nums[i] <= 109
-109 <= target <= 109
- Only one valid answer exists.
/** * @param {number[]} nums * @param {number} target * @return {number[]} */ function twoSum(nums, target) { // Your code here }
Spatial Repitition Review
Each day, solve only the problems you need to so your brain learns new strategies and reinforces key concepts in the most effective way possible.
- Track your daily study streak and build consistency
- See which problems are due for review today
- Monitor your progress with beautiful visualizations
- Get personalized recommendations based on your performance
Study Dashboard
Current Streak
Due Today
Due Problems
Due Today
12 problemsTwo Sum
Valid Parentheses
Merge Two Sorted Lists
Maximum Subarray
LRU Cache
Loved by Developers
See what our users have to say about how Repcode has transformed their coding interview preparation.
"Repcode's spaced repetition system has completely changed how I retain algorithm knowledge. I'm actually remembering solutions months later!"
Tariq A.
Software Engineer @ Marqeta
"This is hands down the best tool I've ever used to practice Leetcode and prepare for technicals. I will be sharing this with my fellow CS classmates for sure."
Mohnish G.
SWE Intern @ Microsoft
"Hey, I've just started using this website and I feel its amazing. Thank you for this. This is going to help me immensely in my preparation to get into a good company."
Abhishek C.
CS Student
"I used to use Anki to study Leetcode, but Repcode is like 1000x better. Way more features, easier to use, and it feels like I can learn way faster."
Noor H.
Software Engineer @ Zoox
"Great site, really helped me grind technical interview prep for the very short duration that I was actually prepping. I found it useful for that time though."
Tejes S.
Founder/CEO @ Poppin
"Really cool concept and fantastic execution! For the first time ever in my life I actually enjoyed learning about and practicing Leetcode. Weird I know."
Saba A.
TPM @ Google
Contact us
Questions? Bugs? Want to contribute? Let us know!
Email repcode.io@gmail.com, or fill out the form below.