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

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

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

โจทย์ประจำวัน

Largest Adjacent-Digit Product

ปานกลาง Take every contiguous window of span digits and multiply its digits.

สถิติต่อเนื่องรายวัน
แก้เลย

ชุมชนเพิ่งแก้สำเร็จ

โค้ดที่ผ่านล่าสุดจากนักพัฒนาคนอื่น อ่านโค้ดและรีวิว AI แล้วลองแก้โจทย์เพื่อร่วมพูดคุย

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

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

226 โจทย์
ปานกลาง

Game of Life Step

ดำเนินเกมชีวิตของคอนเวย์ไปข้างหน้าอีกหนึ่งเจเนอเรชัน

คุณจะได้เรียนรู้ จำลองบนตารางนับเพื่อนบ้าน
AdvancedGridsHackathonSimulation
ยังไม่มีวิธีแก้
ยาก

Shortest Delivery Tour

Visit every city once and return home as cheaply as possible.

คุณจะได้เรียนรู้ Bitmask DPปัญหาการเดินทางของพนักงานขาย
AdvancedBitmasksCompetitive-programmingDynamic-programming
ยังไม่มีวิธีแก้
ง่าย

Distance Between Points

Compute the straight-line distance between two points.

คุณจะได้เรียนรู้ ทฤษฎีบทพีทาโกรัสรากที่สอง
BeginnerFunctionsLearning-pathmath
ยาก

Minimum Window Substring

Find the shortest piece of text containing all required characters.

คุณจะได้เรียนรู้ ขยายและหดหน้าต่างตารางความถี่
AdvancedCompetitive-programmingSliding-windowStrings
ยังไม่มีวิธีแก้
ยาก

Longest Path in a DAG

Find the heaviest path in a task dependency graph.

คุณจะได้เรียนรู้ ลำดับเชิงทอพอโลยีDP บน DAG
AdvancedGraphsHackathonTopological-sort
ยังไม่มีวิธีแก้
ปานกลาง

Gradebook Top Student

Find the student with the highest average score.

คุณจะได้เรียนรู้ ลิสต์ 2 มิติค่าเฉลี่ย
BeginnerFunctionsGridsLearning-path
ปานกลาง

Count Islands

Count groups of connected land cells in a grid.

คุณจะได้เรียนรู้ Flood fillDFS แบบ recursive
BeginnerGridsLearning-pathRecursion
ยาก

ค่ามัธยฐานของสองอาเรย์ที่เรียงลำดับแล้ว

หาค่ามัธยฐานของลิสต์ที่เรียงลำดับสองลิสต์เมื่อนำมารวมกัน

คุณจะได้เรียนรู้ ค้นหาจุดแบ่งO(log n)
AdvancedBinary-searchCompetitive-programming
ยังไม่มีวิธีแก้
ปานกลาง

K-th Smallest Element

Find the k-th smallest value without fully sorting.

คุณจะได้เรียนรู้ Quickselectการแบ่งส่วน
AdvancedCompetitive-programmingSorting
ยาก

Word Break

Decide whether text can be split into dictionary words.

คุณจะได้เรียนรู้ DP บน prefixตัดข้อความเป็นคำ
AdvancedDynamic-programmingHackathonStrings
ยาก

Strongly Connected Components

นับกลุ่มของโหนดที่ทุกโหนดสามารถเข้าถึงกันและกันได้ทั้งหมด

คุณจะได้เรียนรู้ อัลกอริทึมกราฟTarjan หรือ Kosaraju
AdvancedCompetitive-programmingGraphs
ยังไม่มีวิธีแก้
ง่าย

สามเหลี่ยมตัวเลข

สร้างสามเหลี่ยมที่มีตัวเลขเพิ่มขึ้นในแต่ละแถว

คุณจะได้เรียนรู้ แถวที่ยาวขึ้นตัวนับข้ามแถว
BeginnerLearning-pathNested-loopsPatterns
ง่าย

ตรวจสอบจำนวนเฉพาะ

ตัดสินว่าตัวเลขเป็นจำนวนเฉพาะหรือไม่

คุณจะได้เรียนรู้ การหารลงตัวปรับลูปให้เร็วขึ้น
BeginnerLoopsNumbersStudent-beginner
ง่าย

นับคู่ที่มีผลรวมเท่ากับค่าที่กำหนด

นับจำนวนคู่ของตำแหน่งที่ค่ารวมกันได้เท่ากับเป้าหมายที่กำหนด

คุณจะได้เรียนรู้ คู่ดัชนีหลีกเลี่ยงการนับซ้ำ
ArraysBeginnerLearning-pathNested-loops
ยาก

สี่เหลี่ยมผืนผ้าที่ใหญ่ที่สุดในฮิสโตแกรม

หาสี่เหลี่ยมผืนผ้าที่ใหญ่ที่สุดที่สามารถวางอยู่ใต้ฮิสโตแกรมได้

คุณจะได้เรียนรู้ สแตกแบบทางเดียวคำนวณพื้นที่
AdvancedCompetitive-programmingStacks
ยังไม่มีวิธีแก้
ยาก

Course Schedule Order

Order courses so every prerequisite comes first.

คุณจะได้เรียนรู้ อัลกอริทึมของ Kahnตรวจหาวงจร
AdvancedGraphsHackathonTopological-sort
ยังไม่มีวิธีแก้
ง่าย

Days in a Month

Return how many days a month has, including leap years.

คุณจะได้เรียนรู้ กฎของปฏิทินฟังก์ชันช่วย
BeginnerConditionsFunctionsLearning-path
ปานกลาง

Tournament Standings

Rank teams from match records.

คุณจะได้เรียนรู้ รวมผลการแข่งขันเรียงตามคีย์
DictionariesParsingSorting
ยังไม่มีวิธีแก้