Skip to content

Instantly share code, notes, and snippets.

View FanaHOVA's full-sized avatar
🛠️
Automating

Alessio Fanelli FanaHOVA

🛠️
Automating
View GitHub Profile
Atom
@FanaHOVA
FanaHOVA / selection_sort.c
Created November 18, 2015 11:20
Selection sort C exercise
#include <stdio.h>
#define SIZE 10
int i;
int array[SIZE] = {1, 5, 9, 59, 19, 950, 124, 4, 555, 512};
int selection_sort(int a[], int n) {
if (n == 1) {
return 0;
@FanaHOVA
FanaHOVA / autoexec.cfg
Last active November 28, 2015 11:53
CSGO cfg
cl_crosshairalpha "153"
cl_crosshaircolor "4"
cl_crosshaircolor_b "50"
cl_crosshaircolor_r "50"
cl_crosshaircolor_g "250"
cl_crosshairdot "0"
cl_crosshairgap "-3"
cl_crosshairsize "3"
cl_crosshairstyle "4"
cl_crosshairusealpha "1"
@FanaHOVA
FanaHOVA / config.cfg
Created November 28, 2015 11:53
cfg csgo
unbindall
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "5" "slot5"
bind "9" "slot9"
bind "a" "+moveleft"
bind "b" "buymenu"
bind "c" "use weapon_knife;use weapon_smokegrenade"
bind "d" "+moveright"
Node* Reverse(Node *head)
{
Node *current_node = head, *next_node;
head = NULL;
while (current_node != NULL) {
next_node = current_node->next;
current_node->next = head;
head = current_node;
@FanaHOVA
FanaHOVA / linkedlist.c
Last active February 5, 2016 17:10
C Linked List
#include <stdio.h>
#include <stdlib.h>
struct nodo {
int chiave;
struct nodo *prec, *succ;
};
typedef struct nodo nodo;
int main() {
#include <stdio.h>
#include <stdlib.h>
struct nodo {
int chiave;
struct nodo *prec, *succ;
};
typedef struct nodo nodo;
struct paridispari {
/*
Merge two sorted lists A and B as one linked list
Node is defined as
struct Node
{
int data;
struct Node *next;
}
*/
Node* MergeLists(Node *headA, Node* headB)
// Knowing that max length of linked list is 100 (was part of the problem text)
int HasCycle(Node* head)
{
if (head == NULL || head->next == NULL) {
return 0;
}
int sum = 0;
while (head->next != NULL && sum <= 100) {
/*
Find merge point of two linked lists
Node is defined as
struct Node
{
int data;
Node* next;
}
*/
int FindMergeNode(Node *headA, Node *headB)