This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/*FUNCAO 1: PARA DISTRIBUIR PECAS PARA OS JOGADORES | |
descricao: com um vetor auxiliar, randomiza as pedras do jogo e depois as distribui entre os jogadores | |
*/ | |
void Distribuir (int *player1, int *player2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_substring(string): | |
""" Function that returns the longest | |
substring without repetition | |
""" | |
max_length = 0 | |
init_sub = -1 | |
letters_dict = {} | |
for idx, letter in enumerate(string): | |
if letter in letters_dict: |