J.D

LeetCode
Leetcode problem solutions.
messagedocumentation_url

LeetCode

Solutions to LeetCode problems implemented in C++.

Problems

  1. Two Sum - Find two numbers in an array that add up to a target value
  2. Add Two Numbers - Add two numbers represented as reverse-order linked lists
  3. Longest Substring Without Repeating Characters - Find the length of the longest substring without repeating characters
  4. Median of Two Sorted Arrays - Find the median of two sorted arrays in O(log(m+n))

Technologies

How to Run

Each problem is in its own numbered directory. Compile and run any solution:

cd 1
g++ main.cpp -o main && ./main

Structure

1/main.cpp - Two Sum
2/main.cpp - Add Two Numbers
3/main.cpp - Longest Substring Without Repeating Characters
4/main.cpp - Median of Two Sorted Arrays