American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – USACO Bronze – Gamas

December 11 @ 6:00 pm - 7:00 pm

Today We Did
  1. We reviewed https://usaco.org/index.php?page=viewproblem2&cpid=1444 solution.
  2. We reviewed “It’s Mooin Time” problem – https://usaco.org/index.php?page=viewproblem2&cpid=1445
Homework
  1. Finish implementation of https://usaco.org/index.php?page=viewproblem2&cpid=1445
  2. Do https://usaco.org/index.php?page=viewproblem2&cpid=1467
  3. Research out how to do sorting in Java
    1. List – ascending and descending.
      1. List<Integer> nums = new ArrayList<Integer>();
        nums.add(100);
        nums.add(-20);
        nums.add(10);
        nums.add(0);
        
        // sort the list here ascending and print
        // ascending -20 0 10 100
        
        // sort the list here descending and print
        // descending 100 10 0 -20
    2. Array
      1. int[] nums = new int[] {100,-20, 10,0};
        
        // sort the array here ascending and print
        // ascending -20 0 10 100
        
        // sort the array here descending and print
        // descending 100 10 0 -20
    3. Sort Map’s keys
      1. Map<String, Boolean> nameToOwnCar = new HashMap<>();
        nameToOwnCar.put("gamas", true);
        nameToOwnCar.put("eugene", false);
        nameToOwnCar.put("john", true);
        nameToOwnCar.put("christian", false);
        
        /**
        * write code to get the keys of the Map
        * sort the keys ascending order and print
        * christian=false, eugene=false, gamas=true, john=true
        *
        * sort the keys descending order and print
        * john=true, gamas=true, christian=false, eugene=false
        */
  4. Also try to do 1 or 2 problems from https://codeforces.com/problemset every day. Choose difficulty 800 to 900.

Details

Date:
December 11
Time:
6:00 pm - 7:00 pm