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
| #include <stdio.h> | |
| #include <malloc.h> | |
| #define FIN "algsort.in" | |
| #define FOUT "algsort.out" | |
| //pointer to function | |
| typedef void (*fnPtr)(int*,int); | |
| void combsort(int *p, int n) { | |
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
| #include <iostream> | |
| #include <fstream> | |
| typedef unsigned long ulong; | |
| typedef unsigned int uint; | |
| namespace Erathostenes { | |
| ulong getCount(ulong n) { |
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
| #include <iostream> | |
| #include <fstream> | |
| #include <vector> | |
| #define FIN "submultimi.in" | |
| #define FOUT "submultimi.out" | |
| using namespace std; | |
| int main() { |
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
| /** | |
| * Adrian Statescu <http://adrianstatescu.com> | |
| * Input -> n circle and one Point | |
| * Output -> belong or not on disk. | |
| */ | |
| #include <stdio.h> | |
| #include <math.h> | |
| #define SIZE 50 | |
| typedef struct TypePoint { |
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
| /** | |
| * Adrian Statescu <http://adrianstatescu.com> - <mergesortv@gmail.com> - <http://thinkphp.ro> | |
| * | |
| * Demystifying the Singly Linked List for C Developers. | |
| * | |
| * - create | |
| * - display | |
| * - reverse | |
| * - addBefore | |
| * - addAfter |
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
| # | |
| # Adrian Statescu <mergesortv@gmail.com> | |
| # | |
| # Euclid's Algorithm implemented in Ruby language for an array of integers | |
| # | |
| # Find using - Divide et Impera | |
| # - Recursion | |
| require 'test/unit' |
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
| # | |
| # Adrian Statescu <mergesortv@gmail.com> | |
| # Object-oriented Programming Concept Polymorphism. | |
| # A class enherits states and behavior from its superclass. Inheritance provides a powerful and natural mechanism for | |
| # organizing and structuring software program. | |
| # Polymorphism is ability to appear in many forms and it is to redefine methods for derivated classes. | |
| # The languages's ability to process objects differently depending on their datatype and class | |
| class Bkt |
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
| #include <iostream> | |
| #define MAXINT 32000 | |
| using namespace std; | |
| struct Node { | |
| int info; | |
| struct Node *next; | |
| }; |
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
| #include <iostream> | |
| #include <cstdlib> | |
| #include <ctime> | |
| using namespace std; | |
| void *readMatrix(int l,int c) { | |
| srand (time(NULL)); |
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
| #include <stdio.h> | |
| #include <math.h> | |
| float golden_ration_root_iteration(float phi, float EPS) { | |
| float tmp = 0.0; | |
| phi = 1.0; | |
| EPS = 1E-8; |