Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

0001 Solution in c language#4422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
yanglbme merged 8 commits intodoocs:mainfrompranjal030404:main
May 22, 2025
Merged

0001 Solution in c language#4422

yanglbme merged 8 commits intodoocs:mainfrompranjal030404:main
May 22, 2025

Conversation

pranjal030404
Copy link
Contributor

@pranjal030404pranjal030404 commentedMay 22, 2025
edited
Loading

I have added the solution of Problem no .0001 in the c language and i have also edited the readme file there which you can see in the main branch actually i forgot to create another branch and bymistake i have added it to the main branch you can just check out it
The path location is " leetcode\solution\0000-0099\0001.Two Sum "
I would like to join your team and try to contribute as much as i can
Waiting for your review

@idoocs
Copy link
Member

🤭 感谢你的提交,请检查你的改动是否符合以下项目规范。

1. 格式化

我们项目中各种编程语言代码(包括文档)所采用的格式化工具不同,提交 pr 之前必须确保代码、文档正确格式化。

  • .{md,js,ts,php,sql,rs} 采用 prettier
  • .{c,cpp,java} 采用 clang-format
  • .{py} 采用 black
  • .{go} 采用 gofmt
  • 其它待完善

2. Git 提交信息

我们项目遵循AngularJS Git Commit Message Conventions 规范,我们希望你的提交信息尽可能与项目保持一致。

  • 新增或修改题解:feat: add/update solution(s) to lc problem(s): No.xxxx
  • 修复错误:fix: xxxx
  • 日常维护:chore: xxx

3. 其它补充

新增题解及代码时,需要创建 Solution.xxx 源代码文件(如果已存在,请确认算法是否更优,是则覆盖已有算法代码),同时,需要在 README.md 以及 README_EN.md 中添加对应的代码片段(英文文件中不要出现中文注释)
另外,编码风格(比如变量、函数的命名),尽量跟项目已有代码保持一致。


🤭 Thank you for your contribution. Please check if your changes comply with the following project specifications.

1. Formatting

We use different formatting tools for various programming languages (including documentation) in our project. You must ensure that the code and documentation are correctly formatted before submitting a pr.

  • .{md,js,ts,php,sql,rs} use prettier
  • .{c,cpp,java} use clang-format
  • .{py} use black
  • .{go} use gofmt
  • Others to be improved

2. Git Commit Message

Our project follows theAngularJS Git Commit Message Conventions. We hope that your submission information is as consistent as possible with the project.

  • Add or modify solutions: feat: add/update solution(s) to lc problem(s): No.xxxx
  • Fix errors: fix: xxxx
  • Routine maintenance: chore: xxx

3. Other notes

When adding solutions and code, you need to create a Solution.xxx source code file (if it already exists, please confirm whether the algorithm is better, if yes, overwrite the existing algorithm code), and at the same time, you need to add the corresponding code snippets in README.md and README_EN.md (do not have Chinese comments in the English file)
In addition, the coding style (such as the naming of variables and functions) should be as consistent as possible with the existing code in the project.

pranjal030404 reacted with thumbs up emoji

@idoocsidoocs added cIssues or Pull requests relate to .c code mdIssues or Pull requests relate to .md files labelsMay 22, 2025
@yanglbme
Copy link
Member

hi, your code couldn't pass all test cases :)

@pranjal030404
Copy link
ContributorAuthor

pranjal030404 commentedMay 22, 2025 via email

sorry let me check once again and then i will recommit it if you like itthen we can go furtherand is there any other problem in that and if you like or want then iwanted to join your team
On Thu, 22 May 2025 at 17:53, Libin YANG ***@***.***> wrote: *yanglbme* left a comment (doocs/leetcode#4422) <#4422 (comment)> hi, your code couldn't pass all test cases :) — Reply to this email directly, view it on GitHub <#4422 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BLSWUL6FMDVOOITD6NFYDOT27W6U7AVCNFSM6AAAAAB5VZXUAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMBRGAZTMMJXGY> . You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>

@pranjal030404
Copy link
ContributorAuthor

pranjal030404 commentedMay 22, 2025
edited
Loading

Screenshot (418)
Waiting for your review

@yanglbme
Copy link
Member

Hello, your code has a time complexity of$O(n^2)$ we’re looking for an$O(n)$ solution, so I’ll modify your code.

@yanglbmeyanglbme merged commit9eb9ca9 intodoocs:mainMay 22, 2025
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@yanglbmeyanglbmeyanglbme approved these changes

Assignees
No one assigned
Labels
cIssues or Pull requests relate to .c codemdIssues or Pull requests relate to .md files
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@pranjal030404@idoocs@yanglbme

[8]ページ先頭

©2009-2025 Movatter.jp