ผลต่างระหว่างรุ่นของ "Algo lab/notes/lists 67"
ไปยังการนำทาง
ไปยังการค้นหา
Jittat (คุย | มีส่วนร่วม) (สร้างหน้าด้วย "== Linked list tasks == * Linked lists ** mid61_cookies - linked lists insertion, traversal, and deletion * Queues ([https://en.wikipedia.org/wiki/Queue...") |
Jittat (คุย | มีส่วนร่วม) |
||
(ไม่แสดง 7 รุ่นระหว่างกลางโดยผู้ใช้คนเดียวกัน) | |||
แถว 1: | แถว 1: | ||
== Linked list tasks == | == Linked list tasks == | ||
− | |||
− | |||
* Queues ([https://en.wikipedia.org/wiki/Queue_(abstract_data_type) wikipedia]) | * Queues ([https://en.wikipedia.org/wiki/Queue_(abstract_data_type) wikipedia]) | ||
− | ** b2_icecream1 | + | ** b2_icecream1 - you can implement queues using list. (you can use <tt>push_back</tt> to add something to the queue and use <tt>front</tt> and <tt>pop_front</tt> to take stuff out) |
** b3_icecream2 | ** b3_icecream2 | ||
** Templates: [[Algo_lab/templates/icecream1|icecream1]] | ** Templates: [[Algo_lab/templates/icecream1|icecream1]] | ||
+ | |||
+ | * Linked lists | ||
+ | ** mid61_cookies - linked lists insertion, traversal, and deletion | ||
+ | ** mid62_bonus - linked lists, iteration, insertion | ||
+ | ** mid64_colorrocks - linked lists (or array) | ||
+ | ** mid65_zamoozooma - linked lists, insertion (<tt>push_front</tt>, <tt>push_back</tt>), deletion | ||
+ | *** You need to do some book keeping to make sure you know that some number is in the list. | ||
+ | *** Since the numbers of the balls are in the range 1 - 200000, you can simply use an array to for that. You have to be careful to update the array when balls are removed as well. | ||
+ | *** [[Algo_lab/zamoo|sample code]] | ||
+ | |||
* Stacks ([https://en.wikipedia.org/wiki/Stack_(abstract_data_type) wikipedia]) | * Stacks ([https://en.wikipedia.org/wiki/Stack_(abstract_data_type) wikipedia]) | ||
** Postfix ([[Algo lab/templates/postfix|postfix template]]) | ** Postfix ([[Algo lab/templates/postfix|postfix template]]) | ||
* Simple lists (arrays or linked lists) | * Simple lists (arrays or linked lists) | ||
** Zooma 1 easy | ** Zooma 1 easy | ||
+ | |||
+ | == 2D-array tasks == | ||
+ | |||
+ | * mid63_table | ||
+ | * mid64_slot - you can try all possible rotations (probably using 3-level nested loops) | ||
+ | ** [[Algo lab/slot|hints]] |
รุ่นแก้ไขปัจจุบันเมื่อ 04:44, 26 สิงหาคม 2567
Linked list tasks
- Queues (wikipedia)
- b2_icecream1 - you can implement queues using list. (you can use push_back to add something to the queue and use front and pop_front to take stuff out)
- b3_icecream2
- Templates: icecream1
- Linked lists
- mid61_cookies - linked lists insertion, traversal, and deletion
- mid62_bonus - linked lists, iteration, insertion
- mid64_colorrocks - linked lists (or array)
- mid65_zamoozooma - linked lists, insertion (push_front, push_back), deletion
- You need to do some book keeping to make sure you know that some number is in the list.
- Since the numbers of the balls are in the range 1 - 200000, you can simply use an array to for that. You have to be careful to update the array when balls are removed as well.
- sample code
- Stacks (wikipedia)
- Postfix (postfix template)
- Simple lists (arrays or linked lists)
- Zooma 1 easy
2D-array tasks
- mid63_table
- mid64_slot - you can try all possible rotations (probably using 3-level nested loops)