SlideShare a Scribd company logo
Paper 2 – Exam Revision
AS Level | Grade 11
Data Types
Data Types
Records
Records
Loop
● Loops enable sections of code to be repeated as required.
● They can be constructed in different ways to meet the requirements
of an algorithm.
1 a count-controlled loop FOR … NEXT
2 a post-condition loop REPEAT … UNTIL
3 a pre-condition loop WHILE … DO … ENDWHILE
Linear Search
● To find an item stored in an array, the array needs to be searched.
● One method of searching is a linear search.
● Each element of the array is checked in order, from the lower bound
to the upper bound, until the item is found or the upper bound is
reached.
Linear Search | 1D array pseudocode
Bubble Sort
● Lists can be more useful if the items are sorted in a meaningful order.
● For example, names could be sorted in alphabetical order, or
temperatures could be sorted in ascending or descending order.
● There are several sorting algorithms available. One method of sorting is a
bubble sort.
● Each element of the array is compared with the next element and
swapped if the elements are in the wrong order, starting from the lower
bound and finishing with the element next to the upper bound.
● The element at the upper bound is now in the correct position.
● This comparison is repeated with one less element in the list, until there
is only one element left or no swaps are made.
Bubble Sort | Pseudocode
2 D Array
2 D Array
Files
This pseudocode shows how the file myText.txt could be written to and read from:
Stack
• Stack – a list containing several items operating on the last in, first out (LIFO) principle. Items
can be added to the stack (push) and removed from the stack (pop). The first item added to
a stack is the last item to be removed from the stack.
• The value of the basePointer always remains the same during stack operations.
• A stack can be implemented using an array and a set of pointers. As an array has a finite size,
the stack may become full and this condition must be allowed for.
Queue
Queue – a list containing several items operating on the first in, first out (FIFO)
principle. Items can be added to the queue (enqueue) and removed from the
queue (dequeue). The first item added to a queue is the first item to be
removed from the queue.
• The value of the frontPointer changes after dequeue but the value of the
rearPointer changes after enqueue:
Linked List
● Linked list – a list containing several items in which each item in the list
points to the next item in the list. In a linked list a new item is always added
to the start of the list.
Comparison

More Related Content

What's hot

Mcsp 060 project guidelines july 2012
Mcsp 060 project guidelines july 2012Mcsp 060 project guidelines july 2012
Mcsp 060 project guidelines july 2012
Abhishek Verma
 

What's hot (20)

Metadata ppt
Metadata pptMetadata ppt
Metadata ppt
 
Ethics in Data Science and Machine Learning
Ethics in Data Science and Machine LearningEthics in Data Science and Machine Learning
Ethics in Data Science and Machine Learning
 
Introduction to Data Warehouse
Introduction to Data WarehouseIntroduction to Data Warehouse
Introduction to Data Warehouse
 
Final Year Project BCA Presentation on Pic-O-Stica
Final Year Project BCA Presentation on Pic-O-SticaFinal Year Project BCA Presentation on Pic-O-Stica
Final Year Project BCA Presentation on Pic-O-Stica
 
Mcsp 060 project guidelines july 2012
Mcsp 060 project guidelines july 2012Mcsp 060 project guidelines july 2012
Mcsp 060 project guidelines july 2012
 
Data quality architecture
Data quality architectureData quality architecture
Data quality architecture
 
online blood bank system design
online blood bank system designonline blood bank system design
online blood bank system design
 
Ppt of e voting
Ppt of e votingPpt of e voting
Ppt of e voting
 
Data
DataData
Data
 
Adbms 11 object structure and type constructor
Adbms 11 object structure and type constructorAdbms 11 object structure and type constructor
Adbms 11 object structure and type constructor
 
Iot presentation
Iot presentationIot presentation
Iot presentation
 
1. Introduction to IoT
1. Introduction to IoT1. Introduction to IoT
1. Introduction to IoT
 
Data Quality Dashboards
Data Quality DashboardsData Quality Dashboards
Data Quality Dashboards
 
Lecture 01 Evolution of Decision Support Systems
Lecture 01 Evolution of Decision Support SystemsLecture 01 Evolution of Decision Support Systems
Lecture 01 Evolution of Decision Support Systems
 
Data Warehousing
Data WarehousingData Warehousing
Data Warehousing
 
Online Bus Reservation System
Online Bus Reservation SystemOnline Bus Reservation System
Online Bus Reservation System
 
ITI015En-The evolution of databases (I)
ITI015En-The evolution of databases (I)ITI015En-The evolution of databases (I)
ITI015En-The evolution of databases (I)
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
Big data ppt
Big data pptBig data ppt
Big data ppt
 
Unit01 dbms 2
Unit01 dbms 2Unit01 dbms 2
Unit01 dbms 2
 

Similar to Paper 2 – Exam Revision Notes.pdf

DS PPT - ( 1 )SORTING lgoritham techniques with bast example
DS PPT - ( 1 )SORTING lgoritham techniques with bast exampleDS PPT - ( 1 )SORTING lgoritham techniques with bast example
DS PPT - ( 1 )SORTING lgoritham techniques with bast example
Vivek487417
 
DS PPT - ( 1 )SORTING lgoritham techniques with bast example
DS PPT - ( 1 )SORTING lgoritham techniques with bast exampleDS PPT - ( 1 )SORTING lgoritham techniques with bast example
DS PPT - ( 1 )SORTING lgoritham techniques with bast example
Vivek487417
 
DS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptxDS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptx
prakashvs7
 
DS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptxDS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptx
prakashvs7
 

Similar to Paper 2 – Exam Revision Notes.pdf (20)

Data Structures 3
Data Structures 3Data Structures 3
Data Structures 3
 
Data Structures 3
Data Structures 3Data Structures 3
Data Structures 3
 
DS PPT - ( 1 )SORTING lgoritham techniques with bast example
DS PPT - ( 1 )SORTING lgoritham techniques with bast exampleDS PPT - ( 1 )SORTING lgoritham techniques with bast example
DS PPT - ( 1 )SORTING lgoritham techniques with bast example
 
DS PPT - ( 1 )SORTING lgoritham techniques with bast example
DS PPT - ( 1 )SORTING lgoritham techniques with bast exampleDS PPT - ( 1 )SORTING lgoritham techniques with bast example
DS PPT - ( 1 )SORTING lgoritham techniques with bast example
 
Data Structures_ Sorting & Searching
Data Structures_ Sorting & SearchingData Structures_ Sorting & Searching
Data Structures_ Sorting & Searching
 
DS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptxDS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptx
 
Data Structures_ Sorting & Searching
Data Structures_ Sorting & SearchingData Structures_ Sorting & Searching
Data Structures_ Sorting & Searching
 
DS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptxDS - Unit 2 FINAL (2).pptx
DS - Unit 2 FINAL (2).pptx
 
unit 5 stack & queue.ppt
unit 5 stack & queue.pptunit 5 stack & queue.ppt
unit 5 stack & queue.ppt
 
unit 5 stack & queue.ppt
unit 5 stack & queue.pptunit 5 stack & queue.ppt
unit 5 stack & queue.ppt
 
Python Data Structures and Algorithms.pptx
Python Data Structures and Algorithms.pptxPython Data Structures and Algorithms.pptx
Python Data Structures and Algorithms.pptx
 
Python Data Structures and Algorithms.pptx
Python Data Structures and Algorithms.pptxPython Data Structures and Algorithms.pptx
Python Data Structures and Algorithms.pptx
 
stack.pptx
stack.pptxstack.pptx
stack.pptx
 
stack.pptx
stack.pptxstack.pptx
stack.pptx
 
DS Module 03.pdf
DS Module 03.pdfDS Module 03.pdf
DS Module 03.pdf
 
DS Module 03.pdf
DS Module 03.pdfDS Module 03.pdf
DS Module 03.pdf
 
lecture 02.2.ppt
lecture 02.2.pptlecture 02.2.ppt
lecture 02.2.ppt
 
lecture 02.2.ppt
lecture 02.2.pptlecture 02.2.ppt
lecture 02.2.ppt
 
Data structures
Data structuresData structures
Data structures
 
Data structures
Data structuresData structures
Data structures
 

More from Anjan Mahanta

More from Anjan Mahanta (20)

Project management part 2
Project management part 2Project management part 2
Project management part 2
 
Project management part 1
Project management part 1Project management part 1
Project management part 1
 
13.03 - Satellite communication systems
13.03 - Satellite communication systems13.03 - Satellite communication systems
13.03 - Satellite communication systems
 
13.02 Network Security
13.02   Network Security13.02   Network Security
13.02 Network Security
 
13.01 Network Components
13.01   Network Components13.01   Network Components
13.01 Network Components
 
The role and impact of IT in society
The role and impact of IT in societyThe role and impact of IT in society
The role and impact of IT in society
 
Emerging Technologies
Emerging TechnologiesEmerging Technologies
Emerging Technologies
 
Conditional statistical functions
Conditional statistical functionsConditional statistical functions
Conditional statistical functions
 
Spreadsheet if and nested if function
Spreadsheet if and nested if functionSpreadsheet if and nested if function
Spreadsheet if and nested if function
 
Spreadsheet lookup functions
Spreadsheet lookup functionsSpreadsheet lookup functions
Spreadsheet lookup functions
 
Spreadsheet text functions
Spreadsheet text functionsSpreadsheet text functions
Spreadsheet text functions
 
Spreadsheet Date & Time Functions
Spreadsheet Date & Time FunctionsSpreadsheet Date & Time Functions
Spreadsheet Date & Time Functions
 
Networks and the effects of using them
Networks and the effects of using themNetworks and the effects of using them
Networks and the effects of using them
 
Scratch Animation
Scratch AnimationScratch Animation
Scratch Animation
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
 
Storage devices and media
Storage devices and mediaStorage devices and media
Storage devices and media
 
Using Network
Using NetworkUsing Network
Using Network
 
The Digital Divide
The Digital DivideThe Digital Divide
The Digital Divide
 
Chapter 4 E-Safety and Health & Safety
Chapter 4 E-Safety and Health & SafetyChapter 4 E-Safety and Health & Safety
Chapter 4 E-Safety and Health & Safety
 
Chapter 3 Monitoring and Control
Chapter 3 Monitoring and ControlChapter 3 Monitoring and Control
Chapter 3 Monitoring and Control
 

Recently uploaded

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
parmarsneha2
 

Recently uploaded (20)

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
 

Paper 2 – Exam Revision Notes.pdf

  • 1. Paper 2 – Exam Revision AS Level | Grade 11
  • 6. Loop ● Loops enable sections of code to be repeated as required. ● They can be constructed in different ways to meet the requirements of an algorithm. 1 a count-controlled loop FOR … NEXT 2 a post-condition loop REPEAT … UNTIL 3 a pre-condition loop WHILE … DO … ENDWHILE
  • 7. Linear Search ● To find an item stored in an array, the array needs to be searched. ● One method of searching is a linear search. ● Each element of the array is checked in order, from the lower bound to the upper bound, until the item is found or the upper bound is reached.
  • 8. Linear Search | 1D array pseudocode
  • 9.
  • 10. Bubble Sort ● Lists can be more useful if the items are sorted in a meaningful order. ● For example, names could be sorted in alphabetical order, or temperatures could be sorted in ascending or descending order. ● There are several sorting algorithms available. One method of sorting is a bubble sort. ● Each element of the array is compared with the next element and swapped if the elements are in the wrong order, starting from the lower bound and finishing with the element next to the upper bound. ● The element at the upper bound is now in the correct position. ● This comparison is repeated with one less element in the list, until there is only one element left or no swaps are made.
  • 11. Bubble Sort | Pseudocode
  • 12.
  • 15.
  • 16.
  • 17. Files
  • 18.
  • 19. This pseudocode shows how the file myText.txt could be written to and read from:
  • 20. Stack • Stack – a list containing several items operating on the last in, first out (LIFO) principle. Items can be added to the stack (push) and removed from the stack (pop). The first item added to a stack is the last item to be removed from the stack. • The value of the basePointer always remains the same during stack operations. • A stack can be implemented using an array and a set of pointers. As an array has a finite size, the stack may become full and this condition must be allowed for.
  • 21. Queue Queue – a list containing several items operating on the first in, first out (FIFO) principle. Items can be added to the queue (enqueue) and removed from the queue (dequeue). The first item added to a queue is the first item to be removed from the queue. • The value of the frontPointer changes after dequeue but the value of the rearPointer changes after enqueue:
  • 22. Linked List ● Linked list – a list containing several items in which each item in the list points to the next item in the list. In a linked list a new item is always added to the start of the list.