Tuesday

algorithm solving steps

  • REMEMBER READ THE PROBLEM STATEMENT AND DON'T SOLVE A DIFFERENT PROBLEM
  • REMEMBER LOOK FOR RANDOM UNINTUITIVE DETAILS IN THE PROBLEM
  • read the bounds for edge cases
  • function calls are not free
  • unordered naive is faster than lb vector standard

Steps:

  1. Clarify Questions
  2. High-level solution
  3. write out steps of your solution / pseudocode
  4. put some input and check if it works
  5. put input in here

Framework for solving DP problems:

  1. Define the objective function
  2. Identify base cases
  3. Write down recurrence relation ( or transiotion function) for the optimized objective function
  4. What is the order of execution ? (top to buttom or buttom to top)
  5. Where to look for the answer

No comments:

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...