Deep cloning using in memory serialization in java

In demonstration program, I have created a demo class named DeepCloning. I have make use of serialization while make clone. Whenever clone method invoked on an instance of DeepCloning, it will return exact clone/ copy of that instance. For deep cloning, we have to first do the serialization and then deserialization. For serialization, I have ...

Merge Sort, Quick Sort and finding Kth largest element in an unsorted array

Let’s begin with Merge Sort. Running Time : Average Case : O(n log n) Worst Case : O(n log n) Here is the implementation in java:   Now lets check quick sort: Running time: Average case : O(n log n) Worst Case : O(n2) Here is the implementation in java: Now lets solve finding kth ...