Skip to content

Instantly share code, notes, and snippets.

@shashank21j
Last active August 29, 2015 13:56
Show Gist options
  • Save shashank21j/5a68dc0137c2ac43096e to your computer and use it in GitHub Desktop.
Save shashank21j/5a68dc0137c2ac43096e to your computer and use it in GitHub Desktop.

Test Cases Guide: General

A rough map for test cases is

  1. manual/sample (2)
  2. easy one (2)
  3. medium (2)
  4. corner case_TLE (1 or 2)
  5. corner case_WA (any as they are small)
  • On an average there should be 8-12 test files.
  • Include multiple test cases in each file.
  • Expected run time complexity should be somewhere between O(10^6) ~ O(10^7).
  • Author solution should take (time_limit/10) time. Eg. if time limit for a problem is 2 sec, then author solution should take about 0.2 second for worst case.
  • Take into consideration that interpreted languages, like python, is too slow. A program which runs for 2 sec in C++ can take nearly 30-40 second on python.
  • Always code brute + fastest solution
  • Get solution in C++, Python both to have rough idea.
  • @Author, @Tester, please write documented solutions. It will also be used in creating editorials.
  • While creating test case, make sure you don’t add more than one extra white space/line feed at the end. Run SED (sed -i 's/\s*$//g' filename), if on unix system, in order to strip them.
  • Whenever you load any external image, make sure it is accessed via https connection.

Test Cases Guide: Functional Programming Expected complexity should be near O(10^5) ~ O(10^6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment