bdrummo6 / CSPT13_Algorithms_GP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSPT13_Algorithms_GP

Asking for Help

Key Points

  • Everyone will have to ask for help on the job
  • How you form your questions can make it easier or harder for others to help you

DEMO 00

demo_0.md and demo_0.py

Breakout

You now have an opportunity to try out this process.

  • everyone will go in into breakout rooms with 2-3 students.
  • Students should take about 5 minutes and come up with a problem or question that can be shared in the cohort's help channel (one question per breakout room).
  • Can be general programming questions, doesn't need to be specific to this sprint.
  • After you post a question, each room should pick a question and attempt to answer it in a thread. They should ask questions as needed and the original posters should be monitoring and responding as needed.
    • This may take 5-10 minutes, monitor activity to determine how much time to use.
    • students can follow up and attempt to answer questions after class to save time.

Constructing a Plan

Key Points

  • Planning can be one of the most difficult steps in the problem-solving process.
  • Spending a little more time upfront planning can save you tons of time later on in execution.

DEMO 01

demo_1.md and demo_1.py

Implementing a First-Pass Solution

Key Points

  • After we have an initial plan in place, it's often essential to try it out before knowing if it works and how it could be improved.
  • The first few strategies we'll look at at not usually optimal. Using them can lead to very large runtimes and is usually not advised. However, they are great places to start. It is often easier to come up with a solution using one of these approaches. Later on, it can always be revised and optimized.
  • Three approaches that are often used to generate first-pass solutions are:
    • Naive - simple solutions that do not make any attempt to optimize performance or memory usage
    • Brute-Force - try all possible solutions to find the best one. Does not always work for problems with large data sets (will run into timeout errors). Or works but takes an unacceptable amount of time.
    • Greedy - at one or more points, this algorithm makes the "best" choice, similar to what a person might do.

DEMO 02

demo_2.md and demo_2.py

About


Languages

Language:Python 100.0%