Placement preparation is difficult, especially in a constrained timeline. What follows in this README is a set of topics that we did not cover, only because other topics took priority.
Given the strong foundation in Java, Data Structures and Algorithms that you now possess, understanding these topics should not be too challenging.
- Heaps - HackerEarth Tutorial
- Binary Heaps - CMU Notes
- Heap Topics - GeeksForGeeks
- HeapSort - HackerEarth Tutorial
An enum type is a special data type that enables for a variable to be a set of predefined constants. The variable must be equal to one of the values that have been predefined for it. Common examples include compass directions (values of NORTH, SOUTH, EAST, and WEST) and the days of the week.
Because they are constants, the names of an enum type's fields are in uppercase letters.
To make types easier to find and use, to avoid naming conflicts, and to control access, programmers bundle groups of related types into packages.
A package is a grouping of related types providing access protection and name space management. Note that types refers to classes, interfaces, enumerations, and annotation types.
An immutable class is one where an instance of that class cannot be modified in any way after construction. Immutable objects simplify multi-threaded code, since it eliminates the problem of shared read-write access.
Making an immutable class can be trickier than at first sight. The following resource lists down a few guidelines for writing an immutable class.
Look at the wrong and right examples in the immutable directory. One of the examples has been corrected. As an exercise, fix the other two faulty immutable classes as well.
Immutable Classes - Oracle Tutorial
Remember that:
- Multi-threading is good, because it can take advantage of multi-core architectures, and utilizes the CPU to its fullest.
- Multi-threading is tricky, because of issues like deadlocks, shared memory, synchronizing access, etc.
In Java, it is sufficient to understand:
- How to create and start threads
- The
Runnable
interface and theThread
class, and their methods. - The
sleep
,start
,run
andjoin
methods. - The
volatile
keyword - The
synchronized
keyword
Nested classes are divided into two categories: static and non-static. Nested classes that are declared static are called static nested classes. Non-static nested classes are called inner classes.