• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

Search results

  1. KingOfActing

    2016ers Chit-Chat Thread

    4u tomorrow Time to study for the next 2 centuries
  2. KingOfActing

    The Code Marathon.

    For such simple operations I usually prefer them over nested ifs since I always do brace = new line, and always braces after if/else, so that would become heaps messy (not to mention redundant "System.out#println" everywhere :p)
  3. KingOfActing

    The Code Marathon.

    Ahahah I love this Alternatively: for(int i = 1; i <= 100; i++) { System.out.println(i%3 ==0? i%5==0? "FizzBuzz" : "Fizz" : i%5==0 ? "Buzz" : i); }
  4. KingOfActing

    The Code Marathon.

    I posted a Java solution for it earlier :p Java: public static void drawCross(int size) { for(int i = 0; i < size; i++) { char[] array = new char[size]; for(int j = 0; j < size; j++) { array[j] = ' '; } array[i] = '*'; array[size - i - 1] = '*'; System.out.println(new...
  5. KingOfActing

    The Code Marathon.

    Yup, example of that in my solution to the previous question :p
  6. KingOfActing

    2016ers Chit-Chat Thread

    Let's organise something for first week of holidays
  7. KingOfActing

    2016ers Chit-Chat Thread

    When are we having a 2k16er meet guys
  8. KingOfActing

    The Code Marathon.

    I don't see a conversion to an array of integers necessary, since you're just using modes. This also handles the case of having multiple modes (like "0 1 1 0 3" will give [0,1]) Java: public static List<Integer> modes(String line) { if(line == null || line == "") throw new...
  9. KingOfActing

    The Code Marathon.

    Cheeky heapsort ;) Java: public static <T> T nthFromEnd(LinkedList<T> list, int n) { if(n < 0 || n > list.size()) throw new IllegalArgumentException("Invalid value of n - " + n + " for list of size " + list.size()); Iterator<T> iterator = list.descendingIterator(); for(int i = 0; i < n...
  10. KingOfActing

    The Code Marathon.

    Java: public static double median(int[] a) { PriorityQueue<Integer> queue = new PriorityQueue<>(5); for(int i : a) { queue.offer(i); if(queue.size() > 5) { queue.poll(); } } return (queue.poll()+queue.poll())/2D; } Runs in O(n) complexity. Can easily be changed...
  11. KingOfActing

    The Code Marathon.

    Why rewrite code that already exists? Besides, C has qsort that's basically the same thing
  12. KingOfActing

    The Code Marathon.

    Unless your sorting algorithm is better than O(nlogn) you're better off using Arrays#sort (in Java, at least) :p
  13. KingOfActing

    2016ers Chit-Chat Thread

    I've been made! MAY DAY MAY DAY
  14. KingOfActing

    2016ers Chit-Chat Thread

    hey look who isn't dead spoilers: I actually am dead
  15. KingOfActing

    2016ers Chit-Chat Thread

    it was 10°C when I woke up It's 9°C now w h y
  16. KingOfActing

    2016ers Chit-Chat Thread

    my usual attire is fuckboy thx
  17. KingOfActing

    2016ers Chit-Chat Thread

    Drama prop/costume part list includes a rock, 5 white blankets, a rubber band, black arm bands and various fluro paints woop woop
  18. KingOfActing

    2 people in my drama class?

    There aren't that I know of, the group project is a core assessment in the HSC.
  19. KingOfActing

    2016ers Chit-Chat Thread

    the word 'ALARM' makes me want to die now :)))) #flashbacks to 3am nights working on a stupid table that made me do worse on the exam
  20. KingOfActing

    2016ers Chit-Chat Thread

    rip in pieces child we had them do that in our first assessment with a ALARM table thing and oh my god I wanted to dropppp
Top