Coder Social home page Coder Social logo

leetcode-practice's Introduction

leetcode-practice

This repository contains solutions to LeetCode problems from Grind 75, grouped by topics. Each solution file is named with the corresponding LeetCode problem number.

Usage

  • To test, use the following command:
python -m unittest discover -s tests
  • You can also run individual test methods in tests/test_all.py using your IDE's testing framework.

Questions Solved

Arrays

  1. Two Sum
  2. Valid Parentheses

Binary Tree

  1. Binary Tree Level Order Traversal
  2. Maximum Depth of Binary Tree

Graph

  1. Clone Graph
  2. Number of Islands

Hash Table

  1. First Missing Positive
  2. Insert Delete GetRandom O(1)
  3. Ransom Note

Heap

  1. Kth Largest Element in an Array

Linked List

  1. LRU Cache
  2. Reverse Linked List

Matrix

  1. Valid Sudoku

Not in Grind 75

  1. Implement Queue using Stacks

Not in Leetcode

  1. Seven Segment Display to String

Contribute

If you would like to contribute, you can submit PRs with leetcode solutions from Grind 75 that have not already been added, following these requirements:

  • Keep the naming contention: filename starts with LeetCode question number, followed by the question.
  • The docstring in the file should be a link to the the LeetCode problem.
  • Update the README.md with the solved questions added.
  • For every problem, add a corresponding test method to tests/test_all.py.

PRs that don't follow these requirements won't be merged.

Note

run_tests has now been completely removed from master. Please checkout legacy_run_tests branch in order to use it.

leetcode-practice's People

Contributors

arun279 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.