Personal repository for data structures and algorithm solutions in LeetCode.

Table of contents

Due to the amount of topics found in LeetCode, problems can be found in the following categories:

Evaluating time and space complexity of solutions

LeetCode uses a statistical system of time and space evaluation that is different of other pages like HackerRank, and this system also varies on the language that you use: A Java solution will be compared against other Java solutions and so on. The complexity required in the problem will give you a hint of what is required for the overall solution:

  1. , are the easiest to identify
  2. For , will typically be a binary search or related problem
  3. will be merge sort or divide-and-conquer
  4. for factorials
  5. can be identified if the result set happens to scale like a binary pattern, like backtracking or permutations in general

Cracking the Coding Interview has such a good section on time/space complexities and how to figure them out.

Dependencies

This repo was created using Python 3 and PyCharm IDE.

Check the project here.

Tags: algorithms arrays binary search binary search trees bit manipulation data structures dynamic programming graphs hashtable lists queues python queues stacks string trees tries