Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jaebradley/leetcode

Leetcode Problem Solutions
https://github.com/jaebradley/leetcode

leetcode leetcode-java leetcode-solutions programming-challenges

Last synced: about 2 months ago
JSON representation

Leetcode Problem Solutions

Awesome Lists containing this project

README

        

# Leetcode Solutions

Here are solutions (hopefully) to some of the problems on [Leetcode](https://leetcode.com/), which is a collection of programming challenges.

# Problems

* [Array Partition I](https://leetcode.com/problems/array-partition-i/description/)
* > Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as possible.
* [Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/description/)
* [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/description/)
* > Given a string, find the length of the longest substring without repeating characters.
* [`CodeReview` discussion](https://github.com/jaebradley/leetcode/blob/master/codereview/IdentifyLengthOfLongestSubstringWithoutRepeatingCharacters.md)
* [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/description/)
* [Single Number](https://leetcode.com/problems/single-number/description/)
* > Given an array of integers, every element appears twice except for one. Find that single one.
* [Two Sum](https://leetcode.com/problems/two-sum/description/)
* > Given an array of integers, return indices of the two numbers such that they add up to a specific target.
> You may assume that each input would have exactly one solution, and you may not use the same element twice.
* [Linked List Addition](https://leetcode.com/problems/add-two-numbers/description/)
* > You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself.
* [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/description/)
* > Given an array of `n` integers where `n > 1`, `nums`, return an array output such that `output[i]` is equal to the product of all the elements of `nums` except `nums[i]`.
* > Solve it without division and in `O(n)`.
* For example, given `[1, 2, 3, 4]` return `[24, 12, 8, 6]`.