Skip to content

sharvanek/booj-code-test-one

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Booj Code Test

1. Equilibrium Indexes.

What is an equilibrium index?

An equilibrium index of a sequence is an index into the sequence such that the sum of elements at lower indices is equal to the sum of elements at higher indices.

Task

Write a function that, given a sequence, returns its equilibrium indices (if any). Assume that the sequence may be very long. Feel free to Google for hints, but give lots of comments about what your thoughts are and your process for devising an algorithm.

Running the Test

python EquilibriumIndexTest.py

2. TrueBooj

Task

Write a program that when given a range of numbers (for this test 1 to 75) that returns every number in the range. Keep in mind the following exceptions:

  • For multiples of 3, print "True".
  • For multiples of 5, print "Booj".
  • For multiples of 10, print "TrueBooj".

Running the Test

python TrueBoojTest.py

About

First Booj Code Test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages