Giter VIP home page Giter VIP logo

leetcode-16's Introduction

leetcode

This repository is a practice area for leetcode problems. It not only focus on solving but also different solutions.

Furthermore, this repository is mainly for different implemention of problem's on leetcode.

About different between solution and implemention, For example, traversing a tree

1)DFS and BFS are considered as TWO different solutions

2)DFS by recursion and DFS by stack are considered as ONE solution, but TWO different implementions.

However, they both have BEST time complexity and space complexity.

As we know, when interview, for a problem, the requirement are higher than it in programming contests, in programming contests, we only care the algorithm complexity and program correctness, but when in interview, the interviewer often ask other question, especially about the different implemention and solution. For example, he may ask you whether you can implement without define this auxiliary varable, change recursion to stack, traverse without two queues, do not use vector, etc.

And if you practice leetcode just like other online judges, just submit and get Accepted, then throw it away, you're unable to prepare these questions. Actually, different from complexity and correctness, the implemention and solution doesn't have a BEST one and judging standard, for example, when you give interviewer an algorithm with best complexity, he may not let you to optimize, and when you give interviewer a code without bug, he may not let you to fix. but no matter what solution or implementions you give, he may still want you to change to the one he want.

You can discuss the implemention and solution together here, broaden your horizon by view other's code. Maybe it's the best way to deal with these problems.

For more

Leetcode OJ: http://leetcode.com/

Zhenyang's Post (where idea came from): https://www.facebook.com/zhenyang.dai/posts/10200471134888770?comment_id=63436649&offset=0&total_comments=4&notif_t=feed_comment_reply

leetcode-16's People

Contributors

charnugagoo avatar daizhenyang avatar

Watchers

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