Skip to the content. Back to Chapter 2
<style> :not(ul) + ol { counter-reset: list-ctr; list-style-type: none; list-style-position: outside; } :not(ul) + ol > li { counter-increment: list-ctr; } :not(ul) + ol > li::before { content:"Q" counter(list-ctr) ". "; margin-left: -25px; } ol ul { list-style-type: lower-roman; } ol ol { list-style-type: lower-alpha; } ol ul ul { list-style-type: lower-roman; } ul ol { list-style-type: circle; } ul { list-style-type: decimal; } ul ul { list-style-type: lower-alpha; } ul ul ul { list-style-type: lower-roman; }

Chapter 36

  1. > FUNCTION peek -> STRING AS
         IF isEmpty DO
             OUTPUT Stack is empty
         ELSE DO
             RETURN s[top]
         END IF
     END FUNCTION
    
  2. Stack operation Stack contents Return value
    • | ['Blue', 'Red'] | - Pop | ['Blue'] | 'Red' Pop | [] | 'Blue' Push 'Yellow' | ['Yellow'] | None

Exercises