/project-leetcode-solution

Solutions for leetcode's problems

Primary LanguageC++

Project Leetcode Solution

About

This repository collects the nice solutions to leetcode Algorithm problems.

We also provide some self-gathered questions, with negative No. in the problem list.

Authors: Zili Yuan, Yangyao Chen, Young Wu (ranked by random shuffle).

Comments and contritbutions are welcomed.

What are we doing?

Discussion: Each day we determine which problem is to be solved, discuss the possible solution online, exchange good ideas.

Coding: We write code in different languages, use different algorithms, and for each algorithm we also try several implementations (see figure 1 below for an example).

Summary: We compare the performance of algorithms (see figure 2 below for an example), try to find possible extensions of the algorithm to other possible problems, and write short discussion for some interesting problems and algorithms.

Extension: We apply the methods developed when solving the question to the real world, build more realistic models that can help us to understand the society, the world, and the Universe (see figure 3 below for an example).

Figure 1. An example of binary tree data structure. For each question, we discuss and try different data structures, to find the best approach for time efficiency, space cost or the balance of two.Figure 2. An illustration of the comparison of different methods in [problem 784: Letter Case Permutation]. We quantitatively consider the efficiency of algorithms for some interesting problem.Figure 3. An extension of [problem 198: House Robber]. We extend the problem to a more realistic case, considering the possible factors that influence the robbering rate.

Solutions

All problems are ranked by their difficulty. See the Full Problem List.

Some of the problems are tightly connected with specific data structures. We categorized them according to the data structures used in solutions. See Problem Categories.

Implemetations