SlideShare a Scribd company logo
LECTURE 23
BY: RUBYNA VOHRA
AGENDA
• Memory
• Garbage Collection
• Big O Notation (Runtime)
• Doubly LinkedLists
MEMORY
WHAT IS MEMORY IN COMPUTER SCIENCE?
• Memory is the area where the computer stores or remembers data.
• Some types of computer memory are designed to be very fast, meaning that the
central processing unit (CPU) can access data stored there very quickly.
• Your computer's main memory is called RAM (Random Access Memory).
• You can think of it as a workspace the computer uses to get work done. When you double-
click on an app, or open a document, or, well, do much of anything, RAM gets used to store
that data while the computer is working on it.
• H
WHY IS MEMORY IMPORTANT?
• RAM allows your computer to perform many of its everyday tasks, such as
loading applications, browsing the internet, editing a spreadsheet, or
experiencing the latest game.
• Memory also allows you to switch quickly among these tasks, remembering
where you are in one task when you switch to another task.
• It holds the data and instructions that the Central Processing Unit (CPU) needs
• This allows the CPU direct access to the computer program.
• Memory is needed in all computers
GARBAGE COLLECTION
WHAT IS GARBAGE COLLECTION?
• The garbage collector (GC) manages the allocation and release of memory
• When there isn't enough memory to allocate an object, the GC must collect and
dispose of garbage memory to make memory available for new allocations. This
process is known as garbage collection.
• Garbage Collection in C# has the following advantages −
• You don’t need to free memory manually while developing your application.
• It also allocates objects on the managed heap efficiently.
• When objects are no longer used then it will reclaim those objects by
clearing their memory and keeps the memory available for future
allocations.
• Managed objects automatically get clean content to start with, so their
constructors do not have to initialize every data field.
BIG O NOTATION (RUNTIME)
WHAT IS BIG O NOTATION?
• Big O notation is used in Computer Science to describe the performance or complexity of an
algorithm.
• Big O specifically describes the worst-case scenario, and can be used to describe the execution
time required or the space used (e.g. in memory or on disk) by an algorithm.
• Big O notation is a measure of the complexity of your program in terms of the size of the input.
• The size of the input is usually denote as ‘n’. There are usually 2 ways to measure the complexity:
• Time: The number of calculations your program must perform on the input data to get the output.
• For example finding the biggest number in a list of n numbers requires you to check every number
against against your current maximum and see if the new number is higher. Thus for n numbers you need
n checks, or calculations. This has linear time complexity because there is a 1 to 1 relationship between
input the number of calculations to obtain the output. Linear time complexity is denoted as O(n).
• Space: The amount of storage space needed by the program to run its calculations.
• We will use the above example of finding the biggest number in a list of n numbers. We need a variable
to store our current maximum number value. If we have 10 numbers, we need 1 variable, if we have a
million numbers, we still need 1 variable. The number of variables we need is constant compared to the
input size, so our program has constant space complexity, denoted as O(1).
LIVE WALKTHRU/EXPLANATION
• Write code for each of the runtimes discussed
• Share out – the class will guess what runtime your code is displaying
DOUBLY LINKEDLISTS
WHAT IS A DOUBLY LINKEDLIST?
• In computer science, a doubly linked list is a linked data structure that consists of a set
of sequentially linked records called nodes. Each node contains three fields: two link
fields and one data field.
THE DIFFERENCE BETWEEN A LINKEDLIST AND
DOUBLY LINKEDLIST
• A Doubly LinkedLists has references that goes both ways compared to a Singly
LinkedList that has references pointing one way
LIVE WALKTHRU/EXPLANATION
DISCUSSION
• Why is this important?
• How can this be useful to me?
• How can I use this in my current
job?
• How can I use this in my future
career?
• What will I get out of this?
• How is this used in the real world
Regroup and discuss after…
COMPLETE THE
WORKSHEET WITH
YOUR GROUP
Regroup and discuss after…

More Related Content

What's hot

Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycle
Dhana malar
 
Bootstrapping in Compiler
Bootstrapping in CompilerBootstrapping in Compiler
Bootstrapping in Compiler
Akhil Kaushik
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming Paradigms
ChristopherEsteban2
 
Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2Raja Hamid
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
Paras Patel
 
Introduction to programming by MUFIX Commnity
Introduction to programming by MUFIX CommnityIntroduction to programming by MUFIX Commnity
Introduction to programming by MUFIX Commnity
mazenet
 
Intro flash cards
Intro flash cardsIntro flash cards
Intro flash cardslorhow58
 
Intro flash cards
Intro flash cardsIntro flash cards
Intro flash cardslorhow58
 
Interpreted and compiled language
Interpreted and compiled languageInterpreted and compiled language
Interpreted and compiled language
baabtra.com - No. 1 supplier of quality freshers
 
Compiler design
Compiler designCompiler design
Compiler design
suganyasanjai
 
Unit 1
Unit 1Unit 1
Rsqrd AI: ML Tooling at an AI-first Startup
Rsqrd AI: ML Tooling at an AI-first StartupRsqrd AI: ML Tooling at an AI-first Startup
Rsqrd AI: ML Tooling at an AI-first Startup
Sanjana Chowdhury
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
afifahnailah
 
2018-09 - F# and Fable
2018-09 - F# and Fable2018-09 - F# and Fable
2018-09 - F# and Fable
Eamonn Boyle
 
Compilation v. interpretation
Compilation v. interpretationCompilation v. interpretation
Compilation v. interpretation
Alexander Bollbach
 
Computer programming project 15sec
Computer programming project 15secComputer programming project 15sec
Computer programming project 15secJenny Brown
 

What's hot (20)

Unit 1 program development cycle
Unit 1 program development cycleUnit 1 program development cycle
Unit 1 program development cycle
 
Bootstrapping in Compiler
Bootstrapping in CompilerBootstrapping in Compiler
Bootstrapping in Compiler
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming Paradigms
 
Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
Introduction to programming by MUFIX Commnity
Introduction to programming by MUFIX CommnityIntroduction to programming by MUFIX Commnity
Introduction to programming by MUFIX Commnity
 
Intro flash cards
Intro flash cardsIntro flash cards
Intro flash cards
 
Intro flash cards
Intro flash cardsIntro flash cards
Intro flash cards
 
Interpreted and compiled language
Interpreted and compiled languageInterpreted and compiled language
Interpreted and compiled language
 
Compiler design
Compiler designCompiler design
Compiler design
 
Unit 1
Unit 1Unit 1
Unit 1
 
Rsqrd AI: ML Tooling at an AI-first Startup
Rsqrd AI: ML Tooling at an AI-first StartupRsqrd AI: ML Tooling at an AI-first Startup
Rsqrd AI: ML Tooling at an AI-first Startup
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
2018-09 - F# and Fable
2018-09 - F# and Fable2018-09 - F# and Fable
2018-09 - F# and Fable
 
Beekman5 std ppt_13
Beekman5 std ppt_13Beekman5 std ppt_13
Beekman5 std ppt_13
 
Compilation v. interpretation
Compilation v. interpretationCompilation v. interpretation
Compilation v. interpretation
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Computer programming project 15sec
Computer programming project 15secComputer programming project 15sec
Computer programming project 15sec
 

Similar to Lecture 23 p1

Cs 331 Data Structures
Cs 331 Data StructuresCs 331 Data Structures
Computer Programming In C.pptx
Computer Programming In C.pptxComputer Programming In C.pptx
Computer Programming In C.pptx
chouguleamruta24
 
An Introduction To Python - Understanding Computers
An Introduction To Python - Understanding ComputersAn Introduction To Python - Understanding Computers
An Introduction To Python - Understanding Computers
Blue Elephant Consulting
 
Fundamental of Computers
Fundamental of ComputersFundamental of Computers
Fundamental of Computers
Dr. Himanshu Gupta
 
fundamentalofcomputers-postaldeptt-150308230655-conversion-gate01.pdf
fundamentalofcomputers-postaldeptt-150308230655-conversion-gate01.pdffundamentalofcomputers-postaldeptt-150308230655-conversion-gate01.pdf
fundamentalofcomputers-postaldeptt-150308230655-conversion-gate01.pdf
AlihaAzmat1
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Abhishekn84
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basics
Deepak John
 
diploma basic of computers.ppt
diploma basic of computers.pptdiploma basic of computers.ppt
diploma basic of computers.ppt
LathaSrinivas5
 
Parallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptxParallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptx
krnaween
 
lec 1.pptx
lec 1.pptxlec 1.pptx
lec 1.pptx
AhsanAli64749
 
Unit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptxUnit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptx
VanshJain322212
 
Computer Organisation unit 1 basics of computer Organisation
Computer Organisation unit 1 basics of computer OrganisationComputer Organisation unit 1 basics of computer Organisation
Computer Organisation unit 1 basics of computer Organisation
luckyanirudhsai
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & Algorithms
Akhil Kaushik
 
Performance Tuning by Dijesh P
Performance Tuning by Dijesh PPerformance Tuning by Dijesh P
Performance Tuning by Dijesh PPlusOrMinusZero
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
ManoRanjani30
 
Computer Fundamentals.pptx
Computer Fundamentals.pptxComputer Fundamentals.pptx
Computer Fundamentals.pptx
JaimeCanchela1
 
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
LeahRachael
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
rprajat007
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
Sukhendra Singh
 

Similar to Lecture 23 p1 (20)

Cs 331 Data Structures
Cs 331 Data StructuresCs 331 Data Structures
Cs 331 Data Structures
 
Computer Programming In C.pptx
Computer Programming In C.pptxComputer Programming In C.pptx
Computer Programming In C.pptx
 
An Introduction To Python - Understanding Computers
An Introduction To Python - Understanding ComputersAn Introduction To Python - Understanding Computers
An Introduction To Python - Understanding Computers
 
Fundamental of Computers
Fundamental of ComputersFundamental of Computers
Fundamental of Computers
 
fundamentalofcomputers-postaldeptt-150308230655-conversion-gate01.pdf
fundamentalofcomputers-postaldeptt-150308230655-conversion-gate01.pdffundamentalofcomputers-postaldeptt-150308230655-conversion-gate01.pdf
fundamentalofcomputers-postaldeptt-150308230655-conversion-gate01.pdf
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basics
 
diploma basic of computers.ppt
diploma basic of computers.pptdiploma basic of computers.ppt
diploma basic of computers.ppt
 
Parallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptxParallel Computing-Part-1.pptx
Parallel Computing-Part-1.pptx
 
lec 1.pptx
lec 1.pptxlec 1.pptx
lec 1.pptx
 
Unit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptxUnit-1_Digital Computers, number systemCOA[1].pptx
Unit-1_Digital Computers, number systemCOA[1].pptx
 
Computer Organisation unit 1 basics of computer Organisation
Computer Organisation unit 1 basics of computer OrganisationComputer Organisation unit 1 basics of computer Organisation
Computer Organisation unit 1 basics of computer Organisation
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & Algorithms
 
Performance Tuning by Dijesh P
Performance Tuning by Dijesh PPerformance Tuning by Dijesh P
Performance Tuning by Dijesh P
 
Lecture1
Lecture1Lecture1
Lecture1
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
 
Computer Fundamentals.pptx
Computer Fundamentals.pptxComputer Fundamentals.pptx
Computer Fundamentals.pptx
 
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 

More from Skillspire LLC

Logistics
LogisticsLogistics
Logistics
Skillspire LLC
 
Introduction to analytics
Introduction to analyticsIntroduction to analytics
Introduction to analytics
Skillspire LLC
 
Review version 4
Review version 4Review version 4
Review version 4
Skillspire LLC
 
Review version 3
Review version 3Review version 3
Review version 3
Skillspire LLC
 
Review version 2
Review version 2Review version 2
Review version 2
Skillspire LLC
 

More from Skillspire LLC (20)

Logistics
LogisticsLogistics
Logistics
 
Introduction to analytics
Introduction to analyticsIntroduction to analytics
Introduction to analytics
 
Lecture 31
Lecture 31Lecture 31
Lecture 31
 
Lecture 30
Lecture 30Lecture 30
Lecture 30
 
Review
ReviewReview
Review
 
Review version 4
Review version 4Review version 4
Review version 4
 
Review version 3
Review version 3Review version 3
Review version 3
 
Review version 2
Review version 2Review version 2
Review version 2
 
Lecture 24
Lecture 24Lecture 24
Lecture 24
 
Lecture 17
Lecture 17Lecture 17
Lecture 17
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
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
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
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...
Jisc
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
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
TechSoup
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
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
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
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...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
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
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 

Lecture 23 p1

  • 2.
  • 3. AGENDA • Memory • Garbage Collection • Big O Notation (Runtime) • Doubly LinkedLists
  • 5. WHAT IS MEMORY IN COMPUTER SCIENCE? • Memory is the area where the computer stores or remembers data. • Some types of computer memory are designed to be very fast, meaning that the central processing unit (CPU) can access data stored there very quickly. • Your computer's main memory is called RAM (Random Access Memory). • You can think of it as a workspace the computer uses to get work done. When you double- click on an app, or open a document, or, well, do much of anything, RAM gets used to store that data while the computer is working on it. • H
  • 6. WHY IS MEMORY IMPORTANT? • RAM allows your computer to perform many of its everyday tasks, such as loading applications, browsing the internet, editing a spreadsheet, or experiencing the latest game. • Memory also allows you to switch quickly among these tasks, remembering where you are in one task when you switch to another task. • It holds the data and instructions that the Central Processing Unit (CPU) needs • This allows the CPU direct access to the computer program. • Memory is needed in all computers
  • 7.
  • 9. WHAT IS GARBAGE COLLECTION? • The garbage collector (GC) manages the allocation and release of memory • When there isn't enough memory to allocate an object, the GC must collect and dispose of garbage memory to make memory available for new allocations. This process is known as garbage collection. • Garbage Collection in C# has the following advantages − • You don’t need to free memory manually while developing your application. • It also allocates objects on the managed heap efficiently. • When objects are no longer used then it will reclaim those objects by clearing their memory and keeps the memory available for future allocations. • Managed objects automatically get clean content to start with, so their constructors do not have to initialize every data field.
  • 10.
  • 11. BIG O NOTATION (RUNTIME)
  • 12. WHAT IS BIG O NOTATION? • Big O notation is used in Computer Science to describe the performance or complexity of an algorithm. • Big O specifically describes the worst-case scenario, and can be used to describe the execution time required or the space used (e.g. in memory or on disk) by an algorithm. • Big O notation is a measure of the complexity of your program in terms of the size of the input. • The size of the input is usually denote as ‘n’. There are usually 2 ways to measure the complexity: • Time: The number of calculations your program must perform on the input data to get the output. • For example finding the biggest number in a list of n numbers requires you to check every number against against your current maximum and see if the new number is higher. Thus for n numbers you need n checks, or calculations. This has linear time complexity because there is a 1 to 1 relationship between input the number of calculations to obtain the output. Linear time complexity is denoted as O(n). • Space: The amount of storage space needed by the program to run its calculations. • We will use the above example of finding the biggest number in a list of n numbers. We need a variable to store our current maximum number value. If we have 10 numbers, we need 1 variable, if we have a million numbers, we still need 1 variable. The number of variables we need is constant compared to the input size, so our program has constant space complexity, denoted as O(1).
  • 13. LIVE WALKTHRU/EXPLANATION • Write code for each of the runtimes discussed • Share out – the class will guess what runtime your code is displaying
  • 14.
  • 16. WHAT IS A DOUBLY LINKEDLIST? • In computer science, a doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains three fields: two link fields and one data field.
  • 17. THE DIFFERENCE BETWEEN A LINKEDLIST AND DOUBLY LINKEDLIST • A Doubly LinkedLists has references that goes both ways compared to a Singly LinkedList that has references pointing one way
  • 19.
  • 20.
  • 21. DISCUSSION • Why is this important? • How can this be useful to me? • How can I use this in my current job? • How can I use this in my future career? • What will I get out of this? • How is this used in the real world Regroup and discuss after…
  • 22.
  • 23. COMPLETE THE WORKSHEET WITH YOUR GROUP Regroup and discuss after…