This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in | |
all copies or substantial portions of the Software. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Notes: | |
# Sample project C code is not presently written to produce a release artifact. | |
# As such, release build options are disabled. | |
# This sample, therefore, only demonstrates running a collection of unit tests. | |
:project: | |
:use_exceptions: FALSE | |
:use_test_preprocessor: TRUE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int bstNode<Item>::increment(int count) | |
{ | |
increment(count); | |
if (left_field) | |
count= left_field->size()+1; | |
else | |
{ return 0;} | |
if (right_field) | |
count= left_field->size()+1; | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Expected: | |
1 | |
/\ | |
/ \ | |
0 4 | |
/ | |
/ | |
3 | |
/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void printUsage(char call[]) { | |
cout << " Usage: " << call << " [--retrograde]" << endl; | |
} | |
int main (int argc, char* argv[]) | |
{ | |
if (argc == 2 && strcmp(argv[1], "--retrograde") == 0) RETROGRADE_MODE = 1; | |
else if (argc != 1) { | |
printUsage(argv[0]); | |
return -1; |