100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
2.1.2. Thinking Ahead - Computer Science $5.22
Add to cart

Class notes

2.1.2. Thinking Ahead - Computer Science

 54 views  0 purchase
  • Course
  • Institution

2.1.2. Thinking Ahead - Computer Science

Preview 1 out of 7  pages

  • April 7, 2020
  • 7
  • 2019/2020
  • Class notes
  • Unknown
  • All classes
avatar-seller
Data Structures
Advanced Notes

Specification

1.4.2 a)
● Arrays
● Records
● Lists
● Tuples

1.4.2 b)
● Stack
● Queue Arrays, Records, Lists, and Tuples

Arrays
An array is an ordered, finite set of elements of a single type . A 1D (one-dimensional)
array is a linear array . Unless stated in the question, arrays are always taken to be zero-
indexed. This means that the first element in the array is considered to be at position
zero. Below is an example of a one-dimensional array:
________________________________________________________________________
oneDimensionalArray = [1, 23, 12, 14, 16, 29, 12] //creates a
1D array
print(oneDimensionalArray[3])
>> 14
________________________________________________________________________

A two-dimensional array can be visualised as a table or spreadsheet . When
searching through a 2D array, you first go down the rows and then across the columns
to find a given position. This is the reverse to the method used to find a set of coordinates.
Below is an example involving a two-dimensional array.
________________________________________________________________________
twoDimensionalArray = [[123, 28, 90, 38, 88, 23, 47],[1, 23, 12,
14, 16, 29, 12]]

print(twoDimensionalArray)
>> [[23, 28, 90, 38, 88, 23, 47],

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller future170402. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $5.22. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

54879 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$5.22
  • (0)
Add to cart
Added