Sha256: 56032a20a4fb4137aad3813fb0d3682ed6a60cac7e923a9c49aa6f290ff94439
Contents?: true
Size: 701 Bytes
Versions: 69
Compression:
Stored size: 701 Bytes
Contents
#[derive(PartialEq, Eq, Debug)] pub enum Bucket { One, Two } /// A struct to hold your results in. #[derive(PartialEq, Eq, Debug)] pub struct BucketStats { /// The total number of "moves" it should take to reach the desired number of liters, including /// the first fill. pub moves: u8, /// Which bucket should end up with the desired number of liters? (Either "one" or "two") pub goal_bucket: Bucket, /// How many liters are left in the other bucket? pub other_bucket: u8, } /// Solve the bucket problem pub fn solve(capacity_1: u8, capacity_2: u8, goal: u8, start_bucket: &Bucket) -> BucketStats { unimplemented!(); }
Version data entries
69 entries across 69 versions & 1 rubygems