Skip to content
warmachine028 edited this page Jul 28, 2023 · 1 revision

This page tells how to navigate through Arrays package of dataStax library.

What are Arrays?

  • Arrays are collection of similar items in sequential order.
  • Arrays have fixed sizes, i.e. arrays are static data Structures.
  • Arrays provide indexing mechanism for retrieval of items in constant O(1) time.
    • This is done by using pointer arithmetic internally.
    • Suppose if we know the properties like: starting memory address and size of item
    • To retrieve the nth item: we can use the formula: starting_address + n * size_of_item

Modules in Arrays:

  1. Queue
  2. Stack
  3. PriorityQueue