This is my code suite, including homemade build and run tools and testing library, for practicing the Grokking the Coding Interview algo patterns in Java (and also refreshing on some Java and bash basics).
Add methods to an existing .java file and tests in the class's main() method (using the Tester class for test utilities - see example main() methods in existing files)
Create a new .java file/class with package com.cunningdj.grokJava at the top and do the same.
- The command line tool
gtoolcan handle allclean,build, andrunoperations, using these as the respective command argument (e.g.gtool clean). - Run the tool without an argument to see the available commands. Run with commands to perform the desired operations.
gtool buildwill automaticallycleanbefore building.gtool runwill neither build nor clean automatically. To get all of these in one, use thegtool brcommand (see below)
The br command argument will clean, build, and run the given class all in one (you don't need to include the package name for the class).
Example: gtool br GrokkingFastSlowPointers will clean and build all .java files and then run the main method for the GrokkingFastSlowPointers class.