Programming Tips | ||
Dry 1 | ||
Wet 1 | ||
Dry 2 | ||
Wet2 | ||
Dry 3 | ||
What is the complexity for NumInRange ? | |
In NumInRange function the complexity stands for r consecutive calls of NumInRange, a call for any other function will "break" the sequence of consecutive calls, and will "reset" the complexity. The complexity for r consecutive calls of NumInRange will take O( m+ |k| + r), as defined. |
Wet assignments: How do I pass the test file name as an input parameter? | |
In Eclipse: Follow: Run -> Run Configurations -> Arguments. Write the relative path (relative to your project) or absolute path of the input file. Don't forget to click "Apply" to make these changes relevant to the next run of your program. In Visual Studio 2008: Right click your project name (or choose "Project" from the upper bar) and choose "Properties". Click on "Debugging" and enter the name of the test file under "Command Arguments". Note that if you only write the filename (e.g. test1.txt), you should put the test1.txt in your working directory (by default, the directory in which your project is located). |