โจทย์ เขียนโปรแกรม

ฝึกทักษะการแก้ปัญหาด้วยโจทย์กลางที่รองรับ Python, C++ และ C# ทุกคำตอบจะถูกตรวจสอบอัตโนมัติและรีวิวโดย AI

  • Python · C++ · C#
  • ทดสอบอัตโนมัติ
  • รีวิวโค้ดโดย AI
  • แนวทางจากชุมชน
เส้นทางการเรียนรู้
150
โจทย์
2
วิธีแก้ที่แชร์
3
ภาษา

โจทย์ทั้งหมด

ค้นหาตามหัวข้อ ภาษา หรือระดับความยาก

150 โจทย์
ยาก

Longest Path in a DAG

Find the heaviest path in a task dependency graph.

AdvancedGraphsHackathonTopological-sort
ยังไม่มีวิธีแก้
ง่าย

พาสคาลส์ไทรแองเกิล

สร้างแต่ละแถวโดยนำค่าข้างเคียงจากแถวก่อนหน้ามาบวกกัน

ArraysCombinatorics
ยังไม่มีวิธีแก้
ปานกลาง

นับจำนวนวิธีการรวมเหรียญ

นับจำนวนวิธีที่สามารถรวมเหรียญแต่ละชนิดที่กำหนด (มีจำนวนไม่จำกัด) ให้ได้จำนวนเงินที่ต้องการ

CombinatoricsDynamic-programming
ยังไม่มีวิธีแก้
ง่าย

First Negative Index

Find where the first negative number appears.

ArraysBeginnerLearning-path
ยังไม่มีวิธีแก้
ยาก

Minimum Network Connection Cost

Choose undirected links so that every vertex can reach every other vertex, with minimum total cost.

Disjoint-setsGraphsMinimum-spanning-tree
ยังไม่มีวิธีแก้
ปานกลาง

นับจำนวนเส้นทางในกริด

นับจำนวนเส้นทางจากมุมหนึ่งไปอีกมุมหนึ่งในกริดสี่เหลี่ยม โดยสามารถเดินได้เฉพาะทางขวาหรือทางล่างเท่านั้น

CombinatoricsDynamic-programming
ยังไม่มีวิธีแก้
ยาก

Word Break

Decide whether text can be split into dictionary words.

AdvancedDynamic-programmingHackathonStrings
ยังไม่มีวิธีแก้
ง่าย

นับจำนวนการจับมือ

นับจำนวนการจับมือเมื่อทุกคู่ของคนจับมือกันครั้งเดียว

Combinatoricsmath
ยังไม่มีวิธีแก้
ปานกลาง

อัศวินสองตัวที่ไม่โจมตีกัน

นับจำนวนวิธีวางอัศวินสองตัวอย่างปลอดภัยในแต่ละขนาดกระดานสี่เหลี่ยมจัตุรัส

Combinatoricsmath
ยังไม่มีวิธีแก้
ง่าย

Rectangle Perimeter

Compute the perimeter of a rectangle from its sides.

BeginnerLearning-pathVariables
ปานกลาง

Flatten Arbitrarily Nested Lists (Recursion)

Practice recursion by flattening arbitrarily nested lists while skipping null entries.

Data-structuresRecursion
ยังไม่มีวิธีแก้
ง่าย

Simple Interest

Find the total amount after simple interest.

BeginnerLearning-pathVariables
ยังไม่มีวิธีแก้
ยาก

ตัดสี่เหลี่ยมผืนผ้าให้เป็นสี่เหลี่ยมจัตุรัส

หาจำนวนครั้งในการตัดตรงที่น้อยที่สุดเพื่อให้ได้แต่สี่เหลี่ยมจัตุรัสเท่านั้น

Dynamic-programmingGeometry
ยังไม่มีวิธีแก้
ง่าย

ค่าที่มากกว่าค่าเฉลี่ย

เก็บเฉพาะค่าที่มากกว่าค่าเฉลี่ย

ArraysBeginnerLearning-path
ยังไม่มีวิธีแก้
ยาก

Hotel Room Allocation

Assign arriving groups in order.

Segment-treesSimulation
ยังไม่มีวิธีแก้
ง่าย

การเพิ่มจำนวนเมล็ดข้าวบนกระดานหมากรุก

คำนวณจำนวนเมล็ดข้าวบนช่องที่ระบุ และผลรวมของเมล็ดข้าวบนทั้ง 64 ช่อง

NumbersSequences
ยังไม่มีวิธีแก้
ยาก

Mini Stack-Language Interpreter

Evaluate a small stack language.

InterpretersParsingStacks
ยังไม่มีวิธีแก้
ปานกลาง

Recursive Palindrome

Check a palindrome recursively, ignoring case and punctuation.

BeginnerLearning-pathRecursionStrings
ยังไม่มีวิธีแก้