Em đang học cấu trúc dữ liệu và giải thuật gặp bài này k có ý tưởng gì. bro nào giúp e đc k. Code C# ạ

Peter has stack of books Each book takes a number of minutes to read. Peter gives 120 minutes each day to read book. The last book is on top, will be read first Return the list of books that Peter read day by day.
Example Input:
Input bookNames: Pride and Prejudice, Jane Eyre, Gone with the wind, The tord of the Rings', The Catcher in the Rye
bookTimes: 45, 158, 480, 35, 188
Output
Day 1: The Catcher in the Rye; The Lord of the Rings;
Day 2: The Lord of the Rings; Gone With the wind;
Day 3: Gone With the Wind;
Day 4: Gone with the wind;
Day 5: Gone with the wind; Jane Eyre;
Day6: Jane Eyre; Pride and Prejudice;
Day 7: Pride and Prejudice;
 
  • Chủ đề
    c# .net data stucture and algorithm
  • Thống kê

    Chủ đề
    102,334
    Bài viết
    469,986
    Thành viên
    340,425
    Thành viên mới nhất
    Trạm Quà Sweety
    Top