Skip to content

AbdullahNamespace/learn-rust-by-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🦀 Learn Rust by Practice

📖 About | حول المشروع

A collection of Rust programming exercises for learning through practice. Each problem is documented with clear descriptions in both English and Arabic.

مجموعة من تمارين برمجة Rust للتعلم من خلال الممارسة. كل مشكلة موثقة بأوصاف واضحة بالإنجليزية والعربية.


📂 Repository Structure | هيكل المستودع

learn-rust-by-practice/
├── .gitignore                 # Git ignore file | ملف تجاهل الجيت
├── README.md                  # Project overview | نظرة عامة على المشروع
├── template.md                # Problem template | قالب صياغة المشاكل
└── problems/                  # All problem | جميع المشاكل
    ├── 1_problem_name.rs
    ├── 2_problem_name.rs
    └── ...

🚀 Getting Started | البدء

Prerequisites | المتطلبات

rustc --version

Running a Problem | تشغيل مشكلة

# Clone the repository | استنساخ المستودع
git clone https://github.com/AbdullahNamespace/learn-rust-by-practice.git
cd learn-rust-by-practice

# Run a specific problem | تشغيل مشكلة محددة
rustc problems/1_problem_name.rs
./1_problem_name

📝 Problem Template | قالب المشاكل

All problems follow a consistent format defined in template.md:

// ════════════════════════════════════════════════════════════════════════════
// ## 🔷 Problem {NUMBER}: {problem_name}.rs
// ════════════════════════════════════════════════════════════════════════════
// **Category:** {Category} | {التصنيف}
// **Difficulty:** {Easy/Medium/Hard} | {سهل/متوسط/صعب}
// **Source:** {programmingadvices.com / LeetCode / HackerRank}
// ════════════════════════════════════════════════════════════════════════════

// ────────────────────────────────────────────────────────────────────────────
// 📝 DESCRIPTION | الوصف
// ────────────────────────────────────────────────────────────────────────────
//
// EN:
// {Write clear problem description here}
//
// AR:
// {اكتب وصف المشكلة بوضوح هنا}
//
// ────────────────────────────────────────────────────────────────────────────

// ────────────────────────────────────────────────────────────────────────────
// 💡 EXAMPLES | الأمثلة
// ────────────────────────────────────────────────────────────────────────────
//
// Example 1:
// Input:  {sample input}
// Output: {expected output}
//
// Example 2:
// Input:  {sample input}
// Output: {expected output}
//
// Example 3 (Edge Case):
// Input:  {edge case}
// Output: {expected output}
//
// ────────────────────────────────────────────────────────────────────────────

// ────────────────────────────────────────────────────────────────────────────
// ⚠️ CONSTRAINTS | القيود
// ────────────────────────────────────────────────────────────────────────────
//
// • {constraint 1} | {القيد الأول}
// • {constraint 2} | {القيد الثاني}
// • {constraint 3} | {القيد الثالث}
//
// ────────────────────────────────────────────────────────────────────────────

// ────────────────────────────────────────────────────────────────────────────
// 🔧 FUNCTION SIGNATURES | توقيعات الدوال
// ────────────────────────────────────────────────────────────────────────────
//
// fn function_name(param: Type) -> ReturnType
// fn helper_function(param: Type) -> ReturnType
//
// ────────────────────────────────────────────────────────────────────────────

Happy Coding! 🦀 | برمجة سعيدة!

About

🦀 Learn Rust by Practice

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages