Ad
  • Custom User Avatar

    for rust, the tests should look like this

            assert_eq!(barista(vec![]), 0);
            assert_eq!(barista(vec![2, 10, 5, 3, 9]), 85);
            assert_eq!(barista(vec![4, 3, 2]), 22);
            assert_eq!(barista(vec![20, 5]), 32);
            assert_eq!(barista(vec![20, 5, 4, 3, 1, 5, 7, 8]), 211);
            assert_eq!(barista(vec![5, 4, 3, 2, 1]), 55);