Skip to content

Personal C solutions for LeetCode questions. Any PR about the existing solutions is welcomed, while that for the nonexistent solutions isn't since I want to solve them myself first.

License

Notifications You must be signed in to change notification settings

dodo920306/leetcode_all_in_c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode All in C

I want to solve LeetCode questions but only with C this time, and I will upload solutions here.

Any PR about the existing solutions is welcomed, while that for the nonexistent solutions isn't since I want to solve them myself first.

Prerequisites

  • A C compiler

Installation

First, clone the repository.

$ git clone https://github.com/dodo920306/leetcode_all_in_c.git
$ cd leetcode_all_in_c

Second, another repository must also be included since sadly I can't make every data structure from scratch (I wish I could).

$ git clone https://github.com/troydhanson/uthash.git

And, This is totally legal since even Leetcode itself recommends it.

Usage

Use your C compiler on your computer to compile each solution and run it, simple as that.

If you're using gcc, you can simply test every question with

$ chmod +x test.sh
$ ./test.sh ${question_number}

.

Content

In every solution provided here, there must be a main function in it to provide an example input to the solution function.

The example inputs used here typically came from the question descriptions provided by LeetCode itself originally.

About

Personal C solutions for LeetCode questions. Any PR about the existing solutions is welcomed, while that for the nonexistent solutions isn't since I want to solve them myself first.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages