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
| /** | |
| ---------------------------------------------------------------- | |
| Play Melody by Touch | |
| written by victoria wu | |
| summer 2012 | |
| Cycle through a melody using a touch sensor. | |
| Uses CapSense libarry - http://www.arduino.cc/playground/Main/CapSense | |
| ---------------------------------------------------------------- | |
| */ |
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
| Sorting ... Increasing! | |
| =========================== | |
| Size: 100 | |
| Timsort: 4.53219e-005 | |
| mergesort: 0.0014503 | |
| Size: 1000 | |
| Timsort: 2.07324e-005 | |
| mergesort: 0.0151718 |
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
| for(int i =0; i < size; i++) | |
| { | |
| //fin >> temp; | |
| hello[i] = i; | |
| if(i < 100) | |
| data.push_back(temp); | |
| } |
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
| Before mergify | |
| 1 2 3 3 5 7 8 9 16 21 22 23 1 2 2 10 11 13 15 16 17 18 20 24 25 | |
| after mergify | |
| 1 1 2 2 2 3 3 5 7 8 9 10 11 13 15 16 16 17 18 20 21 22 23 24 25 | |
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
| // Buzzer example function for the CEM-1203 buzzer (Sparkfun's part #COM-07950). | |
| // by Rob Faludi | |
| // http://www.faludi.com | |
| // Additions by Christopher Stevens | |
| // http://www.christopherstevens.cc | |
| //Taken from http://www.instructables.com/id/Play-the-French-Can-Can-Using-an-Arduino-and-Buzze/step8/Play-Musical-Notes/ |
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
| /** | |
| Victoria Wu | |
| CS 352 | |
| Treap | |
| An implementation of a binary search tree that incorporates properties of a heap, | |
| preventing an overly imbalanced tree. | |
| */ |
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
| for(int i =10000; i<= 160000; i*=2) | |
| { | |
| Treap<Student>* time = new Treap<Student>(); | |
| Student hello; | |
| for(int x = 0; x < i; x++) | |
| { | |
| hello = Student(x); | |
| time->insert(hello); |
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
| cout << "Finding Min Stuff " << endl << endl; | |
| for(int i =100000; i<= 1600000; i*=2) | |
| { | |
| Treap<Student>* time = new Treap<Student>(); | |
| Student hello; | |
| for(int x = 0; x < i; x++) | |
| { |
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
| for(int i =10000; i<= 160000; i*=2) | |
| { | |
| Treap<Student>* time = new Treap<Student>(); | |
| Student hello; | |
| for(int x = 0; x < i; x++) | |
| { | |
| hello = Student(x); | |
| time->insert(hello); |
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
| for(int i =10000; i<= 160000; i*=2) | |
| { | |
| Treap<int>* time = new Treap<int>(); | |
| begin = clock(); | |
| for(int x = 0; x < i; x++) | |
| { | |
| time->insert(x); | |
| } | |
| end = clock(); | |
NewerOlder