Data Structures A level Computer
Science AQA
2024 Exam Questions and Answers
What is a queue? - Answer>>A First In First Out Data Structure.
What is a stack? - Answer>>A LIFO, last-in first-out data
structure.
Define Abstract data type - Answer>>An abstract data type is a
logical description of how the data is viewed and the operations
that can be performed on it, but this is not necessarily known to
the user.
What are queue's used in? - Answer>>Characters typed in a
keyboard are held in a queue in a keyboard buffer.
Queues are useful in simulation programs simulates customers.
Output waiting to be printed.
What is abstraction? - Answer>>The removal of unnecessary
details from a program making it easier to solve.
What are the following operations needed for a queue? -
Answer>>Enqueue(item): Adds a new item to the rear of the
queue.
deQueue(): Removes the front item from the queue and returns it.
IsEmpty(): Test to see whether the queue is empty.
IsFull(): Test to see whether the queue is full.
, What is dynamic data structure? - Answer>>A dynamic data
structure refers to the collection of data in memory that has the
ability to grow or shrink in size, it does this with the aid of the
heap which is a portion of memory from which space is
automatically allocated or de-allocated as required.
Very useful for implementing data structures like queues.
Example is a lists.
What is static data structure - Answer>>A static data structure
such as static array is fixed in size, and cannot increase in size or
free up memory whilst the program is running.
How do you implement a linear queue? - Answer>>There are 2
ways to to implement a linear queue in an array or list:
As the items leave the queue all of the item move up one space.
So that the front of the queue is always the first element of the
structure. With a long queue, this may require significant
processing time.
A linear queue can be implemented with pointers the front and
rear of the queue. An integer holding the size of the array and a
variable giving the number of items in currently in the queue are
needed.
Disadvantage for the implementation of a linear queue? -
Answer>>If items are added to and deleted from the queue
space is created at the front of the queue which cannot be filled.
What is a circular queue? - Answer>>One way of overcoming
the limitations of implementing a queue as linear queue is to use
a circular queue instead so when the array fills up the rear pointer
The benefits of buying summaries with Stuvia:
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
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
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 RevisionKing. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $7.99. You're not tied to anything after your purchase.