Java Array Exercises

This article contains a series of exercises on java arrays, including resizing array implementation, merging sorted arrays, etc.. Resizing-array implementation A Java ArrayList is a resizable-array implementation of the List interface providing amortized-time for insertion of O(1). Exercise: implement a ResizingArray class providing O(1) amortized-time for insertion. Growing the array Read more…

Data Structures

Good knowledge of common data structures is needed in computer science. This article describes common data structures, and present cost and benefits. Lists A List is an abstract data type representing a finite collection of ordered elements. Typically, a List is allocated dynamically depending on the implementation. For example, Array-based Read more…