Skip to content

Instantly share code, notes, and snippets.

View Amorim33's full-sized avatar
💫
Always Learning

Aluisio Amorim Amorim33

💫
Always Learning
View GitHub Profile
@Amorim33
Amorim33 / sql-review.md
Created December 18, 2023 11:42
SQL Review

Schema definition / migrations

CREATE TABLE test (
    test_key INTEGER PRIMARY KEY,
    test_value INTEGER NOT NULL UNIQUE,
);

CREATE TABLE test2 (
    test2_key INTEGER PRIMARY KEY,
    test_key INTEGER NOT NULL,
@Amorim33
Amorim33 / elderly_queue_problem.c
Created January 3, 2023 01:58
Algorithm to solve elderly queue problem
// A commercial establishment implemented a service system with a single queue,
// in which people always enter at the end of the queue, except if they are elderly (those over
// 59 years old), who always enter before the person younger than him who is closest to the
// start of the queue.
// Implement a program to control this queue, in order to meet the requirements
// above.
// The program must read a sequence of people, each one with their age and the time they entered.
// Considering that each person is attended in 3 minutes, the program must print the queue at each time a person enters it.
#include<stdio.h>
@Amorim33
Amorim33 / barycentrics.md
Last active December 14, 2022 14:35
Busca com Coordenadas Baricêntricas - cpp, openGL.

Exercício de Programação da disciplina de Matrizes, Vetores e Geometria Analítica da EACH-USP

Aluisio Amorim

Estruturas e variáveis globais:

// estrutura para representar um ponto no plano cartesiano
typedef struct {
  double x, y;
} CartesianPoint;