{{ message }}

Instantly share code, notes, and snippets.

# Ashaba John Ashaba

• Kampala
Created Jul 5, 2019
A function that merges two arrays together at a given length creating one array array
View merge_arrays.py
 def merge_arrays(a, b, c): index = 0 b_index = 0 b_len = len(b) d = [] for i in a: d.append(i) index += 1 if index == c:
Created Apr 16, 2019
View animalChallengev2.java
 package challenge; import java.util.HashMap; /** * You have 10,000/= bob, and you need to buy exactly 100 animals: * - cows @1000/- * - pigs @200/- * - chicken @50/-
Last active Apr 16, 2019
View animalChallengev1.java
 package challenge; /** * You have 10,000/= bob, and you need to buy exactly 100 animals: * - cows @1000/- * - pigs @200/- * - chicken @50/- * * 1. You must have at least one of each animal * 2. You must use up all Ksh. 10K
Last active Apr 15, 2019
View Depth-first_search.py
 """ There are N countries {1,2,3,4....N} and N-1 roads(i.e depicting a tree) Bishu lives in the Country 1 so this can be considered as the root of the tree. Now there are Q girls who live in various countries (not equal to 1) . All of them want to propose Bishu. But Bishu has some condition. He will accept the proposal of the girl who lives at minimum distance from his country.
Created Apr 2, 2019
View Depth-first_search
Created Apr 1, 2019