Skip to content

brianjpatterson/gravitation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

gravitation

Coding Challenge: Gravitation

/*/ You are given a vertical box divided into equal columns. Someone dropped several stones from its top through the columns. Stones are falling straight down at a constant speed (equal for all stones) while possible (i.e. while they haven't reached the ground or they are not blocked by another motionless stone).

Given the state of the box at some moment in time, find out which columns become motionless first.

Example

rows = ["#..##", ".##.#", ".#.##", "....."]

solution(rows) = [1, 4].

/*/

About

Coding Challenge: Gravitation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published