7 Matching Annotations
  1. Jul 2023
    1. One key idea in this framework is the concept of value tensions: that human values do not exist in isolation and instead involve a balance between values that can come into tension when considering different individuals, groups, or societies.

      I think it's really interesting how programmers not only must focus on the actual code but also how it affects people and how it may introduce values or concepts that are new for some.

    2. In Java, TreeSet is the standard implementation of a set that uses a self-balancing binary search tree data structure called a red-black tree.

      Is there a reason why it's called red black tree? Why is the red node always on the left side?

    3. The priority queue is an abstract data type where elements are organized according to their associated priority values.

      In Java, how do we determine which values are a higher priority than the other values?

    1. The size variable helps maintain the appearance of a dynamically-resizing list by treating only the first size-number of elements as actually in the list.

      So to clarify, to increase the size of an array list you just keep adding one to the size variable every time a new element is added? Is there a limit on size for array lists?

    2. The actual Java implementation of the ArrayList class contains a little more code to create a new array double the current capacity when more space is needed, which is why we call this data structure the dynamic array.

      When resizing an array, should we always resize it to be double the current capacity?