Skip to content

Instantly share code, notes, and snippets.

View MathisHammel's full-sized avatar

Mathis HAMMEL MathisHammel

View GitHub Profile
Strasbourg
Lille Flandres
Lyon-Perrache
Marseille-St-Charles
Metz-Ville
Bordeaux-St-Jean
Toulouse-Matabiau
Avignon-Centre
Nantes
Mulhouse
Strasbourg
Lille Flandres
Lyon-Part-Dieu
Nancy-Ville
Marseille-St-Charles
Bordeaux-St-Jean
Toulouse-Matabiau
Nantes
Rennes
Lyon-Perrache
Port-Vendres
Roscoff
Toulouse-Matabiau
Sarreguemines
Lyon-Part-Dieu
Romorantin-Blanc-Argent
Veynes-Dévoluy
Calais Ville
Lannion
Hazebrouck
@MathisHammel
MathisHammel / directoryTrie.py
Created January 5, 2017 03:16
Simple implementation of a trie to show phone number autocompletion
class Trie:
def __init__(self):
self.children={}
self.label=None
def findall(self):
matches=set()
if self.label!=None:
matches.add(self.label)
for child in self.children:
def maxsubarr(arr):
h=len(arr)
w=len(arr[0])
bestsum=arr[0][0]
bestcoords=None
for lbeg in range(h):
for cbeg in range(w):