Thử thách lập trình C++

226 thử thách bạn có thể giải bằng C++, từ vòng lặp đầu tiên đến đồ thị, quy hoạch động và học máy. Viết code trên trình duyệt, chạy kiểm thử ngay và nhận nhận xét từ AI.

Dễ · 134 Trung bình · 68 Khó · 24

Kỹ năng bạn sẽ luyện: ĐếmTách chuỗiTách chữ sốCông thứcDanh sáchDanh sách 2 chiềuSố họcVòng lặpChia lấy dưHai con trỏHạ gradientKiểm tra hợp lệ
  • Python · C++ · C#
  • Kiểm tra tự động
  • Đánh giá mã bằng AI
  • Giải pháp cộng đồng
226
Thử thách
2
Giải pháp đã chia sẻ
3
Ngôn ngữ

Tất cả thử thách

Tìm theo chủ đề, ngôn ngữ hoặc độ khó.

226 thử thách
Khó

Shortest Delivery Tour

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

Bạn sẽ học QHĐ bitmaskNgười du lịch
AdvancedBitmasksCompetitive-programmingDynamic-programming
Chưa có lời giải
Trung bình

Game of Life Step

Advance Conway's Game of Life by one generation.

Bạn sẽ học Mô phỏng lướiĐếm ô kề
AdvancedGridsHackathonSimulation
Chưa có lời giải
Khó

Minimum Window Substring

Find the shortest piece of text containing all required characters.

Bạn sẽ học Mở rộng và thu hẹp cửa sổBảng tần suất
AdvancedCompetitive-programmingSliding-windowStrings
Chưa có lời giải
Khó

Strongly Connected Components

Count groups of nodes that can all reach each other.

Bạn sẽ học Thuật toán đồ thịTarjan hoặc Kosaraju
AdvancedCompetitive-programmingGraphs
Chưa có lời giải
Trung bình

Shortest Weighted Routes

Find the minimum total route cost from city 1 to each city.

Bạn sẽ học Thuật toán DijkstraXóa trễ
GraphsPriority-queuesShortest-path
Chưa có lời giải
Khó

Longest Path in a DAG

Find the heaviest path in a task dependency graph.

Bạn sẽ học Thứ tự tô pôQHĐ trên DAG
AdvancedGraphsHackathonTopological-sort
Chưa có lời giải
Khó

Median of Two Sorted Arrays

Find the median of two sorted lists combined.

Bạn sẽ học Tìm điểm chiaO(log n)
AdvancedBinary-searchCompetitive-programming
Chưa có lời giải
Trung bình

K-th Smallest Element

Find the k-th smallest value without fully sorting.

Bạn sẽ học QuickselectPhân hoạch
AdvancedCompetitive-programmingSorting
Chưa có lời giải
Khó

Largest Rectangle in a Histogram

Find the largest rectangle that fits under a histogram.

Bạn sẽ học Ngăn xếp đơn điệuTính diện tích
AdvancedCompetitive-programmingStacks
Chưa có lời giải
Dễ

Distance Between Points

Compute the straight-line distance between two points.

Bạn sẽ học Định lý PythagoreCăn bậc hai
BeginnerFunctionsLearning-pathmath
Chưa có lời giải
Khó

Minimum Network Connection Cost

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

Bạn sẽ học Thuật toán KruskalUnion-find
Disjoint-setsGraphsMinimum-spanning-tree
Chưa có lời giải
Khó

Word Break

Decide whether text can be split into dictionary words.

Bạn sẽ học QHĐ tiền tốTách chuỗi thành từ
AdvancedDynamic-programmingHackathonStrings
Chưa có lời giải
Trung bình

Count Islands

Count groups of connected land cells in a grid.

Bạn sẽ học Loang (flood fill)DFS đệ quy
BeginnerGridsLearning-pathRecursion
Chưa có lời giải
Khó

Course Schedule Order

Order courses so every prerequisite comes first.

Bạn sẽ học Thuật toán KahnPhát hiện chu trình
AdvancedGraphsHackathonTopological-sort
Chưa có lời giải
Trung bình

Tournament Standings

Rank teams from match records.

Bạn sẽ học Tổng hợp kết quảSắp xếp theo khóa
DictionariesParsingSorting
Chưa có lời giải
Trung bình

Gradebook Top Student

Find the student with the highest average score.

Bạn sẽ học Danh sách 2 chiềuTrung bình
BeginnerFunctionsGridsLearning-path
Chưa có lời giải
Dễ

Count Pairs With a Sum

Count pairs of positions whose values add up to a target.

Bạn sẽ học Cặp chỉ sốTránh đếm trùng
ArraysBeginnerLearning-pathNested-loops
Chưa có lời giải
Dễ

Tam giác số

Xây dựng một tam giác các số tăng dần.

Bạn sẽ học Hàng tăng dầnBiến đếm qua các hàng
BeginnerLearning-pathNested-loopsPatterns
Chưa có lời giải