View Combsort.c
#include <stdio.h>
#include <malloc.h>
#define FIN "algsort.in"
typedef int (*Comparer)(int, int);
typedef void (*fnPtr)(int*, int, Comparer);
int sort_asc(int a, int b) {
View perianderOfCorinth.c
#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) {
View erathostenes.cpp
#include <iostream>
#include <fstream>
typedef unsigned long ulong;
typedef unsigned int uint;
namespace Erathostenes {
ulong getCount(ulong n) {
View subsets.cpp
#include <iostream>
#include <fstream>
#include <vector>
#define FIN "submultimi.in"
#define FOUT "submultimi.out"
using namespace std;
int main() {
View belongPointCircle.c
/**
* 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 {
View SinglyLinkedList.c
/**
* Adrian Statescu <http://adrianstatescu.com> - <mergesortv@gmail.com> - <http://thinkphp.ro>
*
* Demystifying the Singly Linked List for C Developers.
*
* - create
* - display
* - reverse
* - addBefore
* - addAfter
View EuclidArray.rb
#
# 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'
View polymorphism.rb
#
# 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
View insert_sort_linked_list.cpp
#include <iostream>
#define MAXINT 32000
using namespace std;
struct Node {
int info;
struct Node *next;
};
View ptrToMatrix.cpp
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
void *readMatrix(int l,int c) {
srand (time(NULL));