Hasit Bhatt
BAN USER@zr.roman, what will be the answer for
B
/ \
A C
/ \ / \
C D E F
/ \
E F
Well, I think your solution is wrong,
array: 3 5 2 4 3 5
Now, XOR of 3,5 = 6 and, XOR of 2,4 is also 6.
Your algorithm will fail miserably.
The code which I'm writing below is same as the question.
printf(&unix["\0c%set\012"],(unix)["chak"]+"Trick"-0x67);
printf(&1["\0c%set\012"],(1)["chak"]+"Trick"-0x67);
printf(&1["\0c%set\012"],(1)["chak"]+"Trick"-0x67);
printf(&1["\0c%set"],("chak")[1]+"Trick"-0x67);
printf("c%set",'h'+"Trick"-0x67);
printf("c%set",1+"Trick");
printf("c%set","rick");
So, ultimately, it prints cricket.
By implementing java.io.Serializable, you get "automatic" serialization capability for objects of your class. No need to implement any other logic, it'll just work. The Java runtime will use reflection to figure out how to marshal and unmarshal your objects.
In earlier version of Java, reflection was very slow, and so serializing large object graphs (e.g. in client-server RMI applications) was a bit of a performance problem. To handle this situation, the java.io.Externalizable interface was provided, which is like java.io.Serializable but with custom-written mechanisms to perform the marshalling and unmarshalling functions (you need to implement readExternal and writeExternal methods on your class).
After sorting the list by the starting time, using a queue based events should do.
- Hasit Bhatt November 24, 2016