American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Intro to Competitive Programming – Darin

July 8 @ 7:00 pm - 8:00 pm

What We Did Today:

  1. Reviewed Recursion
  2. Implemented the Fibonacci Function using Recursion
  3. Learnt about Memoization

Homework:

Submit into the google drive here when you are finished!

// new HW
// create a recursive function binSearch(n, low, high) that looks for the number n in a sorted list

// This is called the binary search algorithm

// binSearch(5) = true
// binSearch(1) = false
// 0 2 3 4 5 6 7 8

// see if n is equal to len(list) / 2
// if it is greater than len(list) / 2: traverse the upper half
// else traverse the lower half

// base case
// operation
// recursive function

// output: true or false

hint: use low and high as variables to determine which part of the array to look around

Also watch these two videos:

Dynamic Programming: https://www.youtube.com/watch?v=oNoILrFOx2k

Greedy Algorithms: https://www.youtube.com/watch?v=lfQvPHGtu6Q

Notes:

You can reach out to me at ddjapri@ayclogic.com if you have any questions!

You can find class notes here.

Details

Date:
July 8
Time:
7:00 pm - 8:00 pm
Event Categories:
,
Verified by MonsterInsights