โครงสร้างข้อมูลและอัลกอริทึม (DSA)
ปัญหาที่กำลังมีส่วนร่วมต้องเป็น ไฟล์ ธรรมดา ( เช่น kruskal-algorithm.cpp , linear-search.java ) หรือ ไดเร็กทอรี ที่ซับซ้อนกว่านี้ ( palindrome/ ) นี่คือ problem หน่วย
แผนผังไดเร็กทอรีมีแบบแผนของ algorithms/{language}/{category}/{problem} ดังต่อไปนี้ โดยที่ {language} แสดงถึงรหัสภาษาของปัญหา ( เช่น CPlusPlus สำหรับ C++, CSharp สำหรับ C# ฯลฯ), {category} เป็นหัวข้อหรือหมวดหมู่ของปัญหาที่กำลังมีส่วนร่วม ( เช่น strings , sorting , linked-lists ฯลฯ) และ {problem} เป็นชื่อที่สอดคล้องกับปัญหา ( เช่น linear-search.cpp , palindrome , queue-linked-list.cpp ฯลฯ)
problem เกี่ยวกับหน่วยจะต้องเป็นไปตามข้อกำหนดต่อไปนี้:
palindrome/ , binary-search.cpp ฯลฯ)- )หากคุณมีปัญหาที่อยู่ใน หัวข้อ หรือ หมวดหมู่ ใหม่นอกเหนือจากที่มีอยู่:
README.md )problem ของคุณ (เอกสาร Markdown)- ) (เช่น sorting strings เป็นต้น) ไฟล์ควรเป็นไปตามข้อกำหนดเฉพาะ problem และส่วนขยาย ( เช่น linear-search.java , kruskal-algorithm.cpp , count-inversions.js เป็นต้น)
การสนับสนุนตามโปรเจ็กต์และโฟลเดอร์มีข้อกำหนดการสนับสนุนที่เข้มงวดกว่าเล็กน้อย
โฟลเดอร์ควรเป็นไปตามข้อกำหนดเฉพาะ problem พร้อมด้วยข้อกำหนดต่อไปนี้
โครงสร้างโฟลเดอร์
problem-name
| - .gitignore
| - README.md
| - Makefile # or the specific specification/requirements/configuration file
| - src
| - main.extREADME.md # < Title of the Problem >
< description of the problem >
## Prerequisites
- prerequisite library or package
- [ prerequisite library ] ( https://www.example.com/link-to-official-library )
## Instructions
- instructions to run the project
- < Simple and reproducible commands to execute the project >
``` bash
make # or 'cargo run', or 'dotnet run' or 'mvn exec:java' etc.
```
## Test Cases & Output < if exists>
< If you can provide test cases, describe it here, else remove this section >.gitignore # add all output files and build files to be excluded from git tracking
main # executable file also must have the project name
target / # the build file, for example for rust อาจเป็นอย่างใดอย่างหนึ่งต่อไปนี้
Makefilerequirements.txtpackage.json และ package-lock.jsonCargo.toml และ Cargo.lockgo.mod ไฟล์ซอร์สโค้ดควรอยู่ในโฟลเดอร์ src/ ( เช่น src/main.cpp หรือ src/main.js ) หรือโฟลเดอร์รูท ( เช่น palindrome.go หรือ App.java ) โดยที่ ext เป็นนามสกุลไฟล์สำหรับไฟล์เฉพาะ ภาษาโปรแกรม
ขอย้ำอีกครั้งว่าซอร์สโค้ดต้องเป็นไปตามแบบแผนโครงสร้างไฟล์ที่ถูกต้องซึ่งภาษาการเขียนโปรแกรมบังคับใช้
การเขียนโปรแกรมควรคงกฎเกณฑ์การตั้งชื่อของแต่ละภาษาการเขียนโปรแกรม
| ภาษาโปรแกรม | ผู้ใช้ |
|---|---|
| ซีหรือซี++ | @สารหนู-ATG, @UG-SEP, @aayushjain7, @Ashborn-SM, @Ashad001 |
| ชวา | @TawfikYasser @aayushjain7 @mohitchakraverty |
| ค# | @หมิง-ไจ๋, @Waqar-107 |
| ไป | @ayo-ajayi |
| หลาม | @สารหนู-ATG, @sridhar-5 |
| จาวาสคริปต์ | @หมิง-ไจ |
เอ็มไอที