1 / 24

Pseudocode

[ Section 3.1.2 ]. Pseudocode. Example: insertion-sort algorithm. [ Section 3.1.2 ]. Pseudocode. Example: insertion-sort algorithm High-level pseudocode:. [ Section 3.1.2 ]. Pseudocode. Example: insertion-sort algorithm More detailed pseudocode:. [ Section 3.1.2 ]. Pseudocode.

Download Presentation

Pseudocode

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. [ Section 3.1.2 ] Pseudocode Example: insertion-sort algorithm

  2. [ Section 3.1.2 ] Pseudocode Example: insertion-sort algorithm High-level pseudocode:

  3. [ Section 3.1.2 ] Pseudocode Example: insertion-sort algorithm More detailed pseudocode:

  4. [ Section 3.1.2 ] Pseudocode Example: insertion-sort algorithm Java-code:

  5. [ Section 3.1.2 ] Pseudocode • What is a pseudocode? • Why do we use it?

  6. [ Section 3.2 ] Singly linked lists What are they?

  7. [ Section 3.2 ] Singly linked lists Which classes and methods do we need?

  8. [ Section 3.2 ] Singly linked lists • Inserting an element • at the beginning

  9. [ Section 3.2 ] Singly linked lists • Inserting an element • at the end

  10. [ Section 3.2 ] Singly linked lists Deleting an element - at the beginning

  11. [ Section 3.2 ] Singly linked lists Deleting an element - at the end ?

  12. [ Section 3.3 ] Doubly linked lists Picture: What classes do we need?

  13. [ Section 3.3 ] Doubly linked lists • Insert an element • at the head • at the tail

  14. [ Section 3.3 ] Doubly linked lists • Delete an element • the head • the tail

  15. [ Section 3.3 ] Doubly linked lists Insert an element in the middle

  16. [ Section 3.3 ] Doubly linked lists Delete an element in the middle

  17. [ Section 5.1 ] Stacks Last-in-first-out (LIFO) Which methods might be useful?

  18. [ Section 5.1 ] Stacks How to implement?

  19. [ Section 5.1 ] Stacks The first application: matching parentheses (or tags in html)

  20. [ Section 5.1 ] Stacks The first application: matching parentheses (or tags in html)

  21. [ Section 5.2 ] Queues First-in-first-out (FIFO) Which methods might be useful?

  22. [ Section 5.2 ] Queues How to implement?

  23. [ Section 5.2 ] Queues Pseudocode for implementation via circular arrays

  24. [ Sections 3.2-3, 5.1-2 ] Lists, Stacks, Queues A little bit about time and space requirements: Note: other variants exist: circular lists, double-ended queues, etc.

More Related