• Ice breaker: do you eat leftover pizza hot or cold? (3/4 eat cold)

  • Create a Notion page at the bottom of this page for your group (if you haven’t already), and spend a few minutes playing around with Notion features.

    • Each student in the group should:
      • [x] Type some text
      • [x] Type some code
      • [x] Type an equation
      • [x] insert an image
        • [x] hide the image behind a toggle
      • [x] add a to-do list
      • [x] change the color of text
      • [x] tag a person in your group or @Lian Duan
  • Complete the following activities. You can copy the questions into your own page, but if you do, try to have your answers in a different color.

    • [x] What's an algorithm?
    • [x] What algorithms do you know? Write at least 3 that you know of individually, then share and compare with the others in your group (think about your other classes - 127, 128, discrete, etc)
    • [x] What is pseudocode? Pick ONE algorithm from your group, and try to write it out in pseudocode.
    • [x] Look at the code below for Insertion Sort, written in pseudocode (note that the textbook's format may be a bit different), and see if you can figure out what it's doing (as a group)
    • [ ] Trace through the code using the sample array below and write how each iteration (or pass) through the loops causes the array to change. Make sure you are writing out every pass, don’t just skip to the end 🙂
    let x:i32 = 12;
    
    // infinitely prints "the"
    for(int i=1; i>0; i++) {
    	System.out.println("the");
    }
    
    print("Hello World")
    

    $$ x^2 − 4 = 0. $$

    supersadspongebob.gif

    • sad image

    @Lian Duan

    • [ ] To-Do
    • [ ] This
    • [ ] That
    • [ ] Another Thing

    What is an algorithm? A set of instructions to give an output from a given input.

    Algorithm examples: bfs, dfs, merge sort, binary sort

    Pseudocode: Going line for line of code in layman’s terms

    [24 | 21 | 55 | 8 | 76 | 6 | 2 | 66 | 50 | 82]

    Algorithm InsertionSort(dataList)
    // dataList is a zero-indexed list/array of sortable data
    // n is the length of dataList
    // algorithm modifies the dataList; returns the modified list
    for i = 1 to n-1 do
    	let j = i
    	while j > 0 and dataList[j] < dataList[j-1] do
    		swap dataList[j] and dataList[j-1]
    		let j = j - 1
    return dataList