Skip to content

Instantly share code, notes, and snippets.

@chadstewart
Last active October 4, 2021 08:34
Show Gist options
  • Select an option

  • Save chadstewart/d77d45ec5d1d494e7cda0a4ad3834977 to your computer and use it in GitHub Desktop.

Select an option

Save chadstewart/d77d45ec5d1d494e7cda0a4ad3834977 to your computer and use it in GitHub Desktop.
Problem-solving framework for solving algorithmic interview questions
/*
Framework Skeleton
Understanding the problem {
//Problem Statement
*Problem Statement in own words go here*
//Examples
*Example goes here*
//Example Notes
*Any observations going through the example goes here*
}
Solving the Problem
{
//Proposed Procedure
*Written procedure goes here (brute force preferred)*
Proposed space complexity O(?) / time complexity O(?)
//Can this procedure be optimized?
*Answer to above question goes here*
//Optimized Procedure
*Optimized procedure goes here*
Optimized space complexity O(?) / time complexity O(?)
//Solution Attempt:
*Code goes here*
}
Testing the solution {
//Tests
*Tests go here*
//Testing Notes
*Any testing observations go here*
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment