Skip to content

Instantly share code, notes, and snippets.

@georgeRenard
georgeRenard / Organization.cs
Created March 8, 2018 11:51
Organization - Last Judge Submission @joro
using System;
using System.Collections;
using System.Collections.Generic;
using Wintellect.PowerCollections;
public class Organization : IOrganization
{
MultiDictionary<string, Person> people =
new MultiDictionary<string, Person>(true);
@georgeRenard
georgeRenard / merkletree-solution.py
Created July 20, 2018 13:26
Merkle Tree Implementation Solution
def build_root(self, iterable):
collection = list(iterable)
assert(len(collection) != 0)
if len(collection) % 2 != 0:
collection.append(collection[-1])
collection = [self.__Node(self.digest(x)) for x in collection]
return self.__build_root(collection)
def __build_root(self, collection):
size = len(collection)