View belongPointCircle.c
* Adrian Statescu <>
* 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 <> - <> - <>
* Demystifying the Singly Linked List for C Developers.
* - create
* - display
* - reverse
* - addBefore
* - addAfter
View EuclidArray.rb
# Adrian Statescu <>
# 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 <>
# 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));
View golden-ratio.c
#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;
View map.c
* The question is: What are function pointers used for and how would I use them?
* A simple case is like this:
* You have an array of operations according to you business logic. You have
* a hashing function that reduces an input problem to one of the business logic functions.
* A clean code would have an array an array of function pointers, and your program
* will deduce an index to that array from the input and call it.
* One quit common use case is a callback function. For example if you load
* something from a DB you can implement your loading function so that it
View struct.euclid.go
package main
import "fmt"
type Pair struct {
a, b int
func (n *Pair) euclid() int {
View stoogesort_container.cpp
* Adrian Statescu <>
* StoogeSort implemented in c++.
#include <iostream>
#include <fstream>
#include <vector>
#define FIN ""
#define FOUT "algsort.out"
#define pb push_back