Giter VIP home page Giter VIP logo

leetcode-questions-java's Introduction

Leetcode Problems in Java

All problems can be found here: https://leetcode.com/problemset/

What this repo is:

This is a repo of common Leetcode questions, I created it as I prefer writing code in an IDE, rather than something like Leetcode's online platform. A lot of these solutions may not be the most optimal, so don't take them as model answers. There are also unit tests around every problem, as I wanted to practice my TDD, which I think is something that is often overlooked especially for these types of interview questions.

I've included 'Solution' classes in each problem package where you can write your own solutions if you wish to do so (I assume if anyone comes across this, it's what you'd want to use this repo for). If you want to go a step further though, I'd recommend setting up something similar to this, so you can also TDD every problem.

I know most if most people had a choice they wouldn't want to solve these kind of questions in a language like Java, and would prefer something like Python or JavaScript which is understandable, but again this was mainly done to practice TDD.

Note that not all Leetcode Test Cases are included in the unit tests, I would encourage also writing your own unit tests around these solutions!

Some TDD videos:

Before getting started:

You may need to mark the src as the Sources Root folder - you can do this by right-clicking it, selected 'Mark Directory as' -> Sources Root.

Similarly, you may need to do something similar with the test directory, marking it as the Test Sources Root.

Contents:

  1. TwoSum
  2. Add Two Numbers
  3. Longest Substring Without Repeating Characters
  4. Median Of Two Sorted Arrays
  5. Longest Palindromic Substring
  6. Zigzag Conversion
  7. Reverse Integer
  8. String to Integer conversion (atoi)
  9. Palindrome Number

More to be added soon...

leetcode-questions-java's People

Contributors

chrisloucaides 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.