Giter Club home page Giter Club logo

leetcode_practice's Introduction

GitHub Workflow Status (with event) GitHub issues GitHub repo size Test workflow

leetcode_practice

Use leetcode to learn algorithms

Attention

1.If you want to check the whole leetcode exercises, just see the main branch.
2.The mid branch is only a simplify version of the medium difficulty problem, with only the solution and no other compilation information included.
3.Future, I may creat a new branch called hard,which is the collection of hard difficulty questions and have the similar function with mid branch.

Workflow Intro

  1. This branch has integrated github flow workflow, and uses the official ubuntu online environment to continuous integration and test code. The detailed operation steps are as follows:

  1. Click Actions in the navigation bar on the main branch, then you may see image

In the above figure, you can see a wokrflow in the red box named lcpractice.

  1. Then click the lcpractice to manually run and you may see image

Click ①Run workflow first, then click ②run workflow.

  1. Wait for the system to automatically run and test, or click on it to enter the details page like this image

In this image, you can see that 5 steps need to be executed, and Set up job and Complete job are system self-taking.
Others such as cloneinstallruntesttest are self-set. These run on the ubuntu system provided by github.

  1. Due to the writing environment is Windows and testing environment is Linux, there may be many file format issues, so the execution of the. exe file was not carried out in the test.

leetcode_practice's People

Contributors

sculx avatar

Watchers

Guo, Quan avatar  avatar

leetcode_practice's Issues

Create an answer book and evaluate automatically

Can you provide the expected output of each question and compare the output one-by-one, calculate the timing for them?
And generate a evaluation report in GA, so people coming around can check the report, instead of running by themselves, and understand the state of the repos.
Made yourself a status badge like this or this maybe.

Use a consistent branching model

Understanding how branches work is essential to work with git.
Be realized about you are working on which branch, and what are the roles of each of them.

Usually there is a default branch you want to show to other users, which is main by default "now". Legacy docs might refer to master due to some historical reason.
Am fine with either. Just be consistent, and let gh know by going to project setting somewhere.
gh is using main, while I see you r push something to master.

And you have a mid branch. Not sure what s the purpose of it. You can explain the role of each branch (that is your branching model) some where other users can see.
For branching models that are more commonly used, you might want to consult the following links
https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
https://nvie.com/posts/a-successful-git-branching-model/
https://docs.github.com/en/get-started/quickstart/github-flow

Again, either model should work, just be consistent and declare somewhere so other users can understand.

Any progress here?

Think you have a plan to post two solutions every week. But it is yet empty here. What are you waiting for 😃

Compilable solutions

It is great you are making progress and getting familiar with it. Let's be looking at something more fun.

Please consider making the solutions compilable and runnable for validation from the command line.
This is an essential step in making the automatic pipelines. You don't usually have UI when working with (economically efficient 😄 ) automatic things.

What is more important, it could be a lot more fun here.

For example, there could be a makefile managing the compiler commands, tackling problem selection, and even automatic testing.
Possible semantic:

# To compile the solution for question 812
make 812
# To test the solution for question 812
make 812-test

As you are using Visual Studio, you can figure out its compilers from manuals or google for it.
You might need a sophisticated configure file or cmake to make it robust and feasible for different environment settings. Try to figure it out if you need it.

It might be a significant amount of work. So please consider doing it in a git branch, continue the current exercise with your current branch, and merge (with a nice PR) when the change is ready.

Automating the testing

You are making progress 🔥

I see your concern in testing the windows-based code on linux. But most of the source code won't depend on any OS thing.
If necessary, keep an OS dependent set of headers and make sure the source code for each solution is compatible with either windows or linux.
Then you may use a linux-compatible compiler in the gh action while still play with windows locally.

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.