American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

8 PM – USACO Bronze – Gamas

November 21 @ 8:00 pm - 9:00 pm

Today We Did
  1. Went over the roundabout rounding problem
Homework
  1. 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
        */
        
        
  2. Do codeforces problem
    1. Do the last week codeforces problem, this one – https://codeforces.com/problemset/problem/2167/C
    2. https://codeforces.com/problemset/problem/2167/A
    3. https://codeforces.com/contest/2167/problem/B
  3. Do USACO problem
    1. https://usaco.org/index.php?page=viewproblem2&cpid=1444

Details

Date:
November 21
Time:
8:00 pm - 9:00 pm