Skip to content

Instantly share code, notes, and snippets.

@juanfal
juanfal / leeEquipoBaloncestoDicDic.py
Last active Dec 8, 2022
equipo de baloncesto a dic dic
View leeEquipoBaloncestoDicDic.py
# leeEquipoBaloncestoDicDic.py
# juanfc 2020-01-13
# https://gist.github.com/6734ff330b6e204306b9de677531ab56
# nombre, siempre terminado en coma ‘,’
# - dorsal
# - posición:
# Base, Escolta, Alero, aLa-pivot, Pivot,
# B E A L P
# - promedio de puntos (número real)
View equipoDeBaloncesto.txt
Berni Rodriguez, 5, E, 5.2, 1.7
Luka Zoric, 21, P, 11.2, 4.8
Jorge Garbajosa, 15, L, 7, 3.3
Nedzad Sinanovic, 22, P, 4.2, 3.1
Joel Freeland, 19, P, 13.9, 7.1
Hrvoje Peric, 10, A, 7.7, 3
Gerald Fitch, 4, E, 10.9, 3.8
EJ Rowland, 6, B, 6, 2.5
Kristaps Valters, 9, B, 10.8, 1.9
Saul Blanco, 34, A, 2.2, 1.2
@juanfal
juanfal / wordPuzzle.cpp
Last active Dec 7, 2022
word puzzle 8 directions
View wordPuzzle.cpp
// wordPuzzle.cpp
// juanfc 2022-12-07
// juanfc 22/1/02-2012-02-07-2015-02-02
// Program to find words in a word search game
// https://gist.github.com/ae4d76ce05d243ffd996570f7d695d45
#include <iostream>
#include <array>
#include <iomanip>
using namespace std;
@juanfal
juanfal / multmat.cpp
Last active Dec 6, 2022
matrix mult general
View multmat.cpp
// multMat.cpp
// juanfc 2022-12-05
// https://gist.github.com/37aac4e61e052185136417c9a3f071d9
#include <iostream>
#include <array>
using namespace std;
const int K = 5;
const int M = 4;
@juanfal
juanfal / freqsInt09.cpp
Created Nov 28, 2022
freqs of digits 0 9
View freqsInt09.cpp
// freqsInt09.cpp
// juanfc 2022-11-28
//
#include <iostream>
#include <array>
using namespace std;
const int N = 10;
typedef array<int,N> TFreqs09;
View wordPos.cpp
// wordPos.cpp
// juanfc 2022-11-28
//
#include <iostream>
#include <array>
using namespace std;
const int MAX_DIFF_WORDS = 10;
struct TWord {
@juanfal
juanfal / p07.freqsArrNums.cpp
Last active Nov 28, 2022
freqs of numbers in array
View p07.freqsArrNums.cpp
// p07.freqsArrNums.cpp
// juanfc 2022-11-28
// https://gist.github.com/2efc0fccebc9a1a87dcb6bff50e16c24
#include <iostream>
#include <array>
using namespace std;
const int N = 10;
const int NINT = 6;
View substr.cpp
// substr.cpp
// juanfc 2022-11-24
// https://gist.github.com/bfce3bb4de08d0a30cbb798f13fe886c
#include <iostream>
using namespace std;
int main()
{
void tryThis(int, string, int, int);
View repeatedArr.cpp
// repeatedArr.cpp
// juanfc 2022-11-21
//
#include <iostream>
#include <array>
using namespace std;
const int N = 3;
typedef array<int,N> TVec;
@juanfal
juanfal / t08.mismoConjuntodeletras.py
Last active Nov 18, 2022
mismo conjunto de letras en dos cadenas sin funciones de python
View t08.mismoConjuntodeletras.py
# t08.mismoConjuntodeletras.py
# juanfc 2020-12-09
# https://gist.github.com/63cabaaaee15bac6ad2016b6f6eed39d
def estaEn(cad, let):
i = 0
while i < len(cad) and cad[i] != let:
i += 1
return i < len(cad)