Enviar búsqueda
Cargar
Ds 4
•
0 recomendaciones
•
580 vistas
Niit Care
Seguir
Tecnología
Educación
Denunciar
Compartir
Denunciar
Compartir
1 de 32
Recomendados
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
IRJET- Document Layout analysis using Inverse Support Vector Machine (I-SV...
IRJET- Document Layout analysis using Inverse Support Vector Machine (I-SV...
IRJET Journal
4.80 sy it
4.80 sy it
rajiv1300
Was There A Darwinian Revolution
Was There A Darwinian Revolution
John Lynch
Tri Merge Sorting Algorithm
Tri Merge Sorting Algorithm
Ashim Sikder
Chap04alg
Chap04alg
Munkhchimeg
One Long Argument
One Long Argument
John Lynch
History of Google Local from 2004-2011
History of Google Local from 2004-2011
Mike Blumenthal
Recomendados
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
ijceronline
IRJET- Document Layout analysis using Inverse Support Vector Machine (I-SV...
IRJET- Document Layout analysis using Inverse Support Vector Machine (I-SV...
IRJET Journal
4.80 sy it
4.80 sy it
rajiv1300
Was There A Darwinian Revolution
Was There A Darwinian Revolution
John Lynch
Tri Merge Sorting Algorithm
Tri Merge Sorting Algorithm
Ashim Sikder
Chap04alg
Chap04alg
Munkhchimeg
One Long Argument
One Long Argument
John Lynch
History of Google Local from 2004-2011
History of Google Local from 2004-2011
Mike Blumenthal
National Air And Space Museum Washington DC
National Air And Space Museum Washington DC
Shivakumar Patil
Dc parent 14 2
Dc parent 14 2
mtaft
Google at a glance 1998 - 2008
Google at a glance 1998 - 2008
Andreas Jaffke
Google Algorithm Change History - 2k14-2k16.
Google Algorithm Change History - 2k14-2k16.
Saba SEO
Google
Google
vibhabehl
simple-sorting algorithms
simple-sorting algorithms
Ravirajsinh Chauhan
Introduction to Algorithms
Introduction to Algorithms
pppepito86
Ancient Ideas of Creation & Evolution
Ancient Ideas of Creation & Evolution
John Lynch
Algorithms - Aaron Bloomfield
Algorithms - Aaron Bloomfield
Reggie Niccolo Santos
sPen Data Management
sPen Data Management
Uladzimir Slabin
Sorting pnk
Sorting pnk
pinakspatel
How We Got Where We Are: 40 Years of Planning...
How We Got Where We Are: 40 Years of Planning...
American Astronautical Society
History of Creationism, Parts II & III
History of Creationism, Parts II & III
John Lynch
The Chemical Revolution
The Chemical Revolution
John Lynch
Sorting algorithms
Sorting algorithms
Edward Blurock
The Scientific Revolution
The Scientific Revolution
John Lynch
Why Ben Stein Is Wrong About History & Science
Why Ben Stein Is Wrong About History & Science
John Lynch
CSS 3, Style and Beyond
CSS 3, Style and Beyond
Samsung Open Source Group
Introduction to Information Technology ch 01_b
Introduction to Information Technology ch 01_b
Shahi Raz Akhtar
Introduction to "Origins, Evolution & Creation"
Introduction to "Origins, Evolution & Creation"
John Lynch
Ds 7
Ds 7
Niit Care
Ijetcas14 338
Ijetcas14 338
Iasir Journals
Más contenido relacionado
Destacado
National Air And Space Museum Washington DC
National Air And Space Museum Washington DC
Shivakumar Patil
Dc parent 14 2
Dc parent 14 2
mtaft
Google at a glance 1998 - 2008
Google at a glance 1998 - 2008
Andreas Jaffke
Google Algorithm Change History - 2k14-2k16.
Google Algorithm Change History - 2k14-2k16.
Saba SEO
Google
Google
vibhabehl
simple-sorting algorithms
simple-sorting algorithms
Ravirajsinh Chauhan
Introduction to Algorithms
Introduction to Algorithms
pppepito86
Ancient Ideas of Creation & Evolution
Ancient Ideas of Creation & Evolution
John Lynch
Algorithms - Aaron Bloomfield
Algorithms - Aaron Bloomfield
Reggie Niccolo Santos
sPen Data Management
sPen Data Management
Uladzimir Slabin
Sorting pnk
Sorting pnk
pinakspatel
How We Got Where We Are: 40 Years of Planning...
How We Got Where We Are: 40 Years of Planning...
American Astronautical Society
History of Creationism, Parts II & III
History of Creationism, Parts II & III
John Lynch
The Chemical Revolution
The Chemical Revolution
John Lynch
Sorting algorithms
Sorting algorithms
Edward Blurock
The Scientific Revolution
The Scientific Revolution
John Lynch
Why Ben Stein Is Wrong About History & Science
Why Ben Stein Is Wrong About History & Science
John Lynch
CSS 3, Style and Beyond
CSS 3, Style and Beyond
Samsung Open Source Group
Introduction to Information Technology ch 01_b
Introduction to Information Technology ch 01_b
Shahi Raz Akhtar
Introduction to "Origins, Evolution & Creation"
Introduction to "Origins, Evolution & Creation"
John Lynch
Destacado
(20)
National Air And Space Museum Washington DC
National Air And Space Museum Washington DC
Dc parent 14 2
Dc parent 14 2
Google at a glance 1998 - 2008
Google at a glance 1998 - 2008
Google Algorithm Change History - 2k14-2k16.
Google Algorithm Change History - 2k14-2k16.
Google
Google
simple-sorting algorithms
simple-sorting algorithms
Introduction to Algorithms
Introduction to Algorithms
Ancient Ideas of Creation & Evolution
Ancient Ideas of Creation & Evolution
Algorithms - Aaron Bloomfield
Algorithms - Aaron Bloomfield
sPen Data Management
sPen Data Management
Sorting pnk
Sorting pnk
How We Got Where We Are: 40 Years of Planning...
How We Got Where We Are: 40 Years of Planning...
History of Creationism, Parts II & III
History of Creationism, Parts II & III
The Chemical Revolution
The Chemical Revolution
Sorting algorithms
Sorting algorithms
The Scientific Revolution
The Scientific Revolution
Why Ben Stein Is Wrong About History & Science
Why Ben Stein Is Wrong About History & Science
CSS 3, Style and Beyond
CSS 3, Style and Beyond
Introduction to Information Technology ch 01_b
Introduction to Information Technology ch 01_b
Introduction to "Origins, Evolution & Creation"
Introduction to "Origins, Evolution & Creation"
Similar a Ds 4
Ds 7
Ds 7
Niit Care
Ijetcas14 338
Ijetcas14 338
Iasir Journals
Ds 1
Ds 1
Niit Care
From data mining to knowledge discovery in
From data mining to knowledge discovery in
Raj Kumar Ranabhat
Efficient Temporal Association Rule Mining
Efficient Temporal Association Rule Mining
International Journal of Engineering Inventions www.ijeijournal.com
Efficient Temporal Association Rule Mining
Efficient Temporal Association Rule Mining
IJMER
A04010105
A04010105
International Journal of Engineering Inventions www.ijeijournal.com
Classification Techniques: A Review
Classification Techniques: A Review
IOSRjournaljce
Irjet v4 iA Survey on FP (Growth) Tree using Association Rule Mining7351
Irjet v4 iA Survey on FP (Growth) Tree using Association Rule Mining7351
IRJET Journal
COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
E502024047
E502024047
IJERA Editor
E502024047
E502024047
IJERA Editor
Study of Density Based Clustering Techniques on Data Streams
Study of Density Based Clustering Techniques on Data Streams
IJERA Editor
Ay4201347349
Ay4201347349
IJERA Editor
J017114852
J017114852
IOSR Journals
A classification of methods for frequent pattern mining
A classification of methods for frequent pattern mining
IOSR Journals
G045033841
G045033841
IJERA Editor
Applying K-Means Clustering Algorithm to Discover Knowledge from Insurance Da...
Applying K-Means Clustering Algorithm to Discover Knowledge from Insurance Da...
theijes
CLASSIFICATION ALGORITHM USING RANDOM CONCEPT ON A VERY LARGE DATA SET: A SURVEY
CLASSIFICATION ALGORITHM USING RANDOM CONCEPT ON A VERY LARGE DATA SET: A SURVEY
Editor IJMTER
BI Chapter 04.pdf business business business business
BI Chapter 04.pdf business business business business
JawaherAlbaddawi
Similar a Ds 4
(20)
Ds 7
Ds 7
Ijetcas14 338
Ijetcas14 338
Ds 1
Ds 1
From data mining to knowledge discovery in
From data mining to knowledge discovery in
Efficient Temporal Association Rule Mining
Efficient Temporal Association Rule Mining
Efficient Temporal Association Rule Mining
Efficient Temporal Association Rule Mining
A04010105
A04010105
Classification Techniques: A Review
Classification Techniques: A Review
Irjet v4 iA Survey on FP (Growth) Tree using Association Rule Mining7351
Irjet v4 iA Survey on FP (Growth) Tree using Association Rule Mining7351
COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
COMPUTER LABORATORY-4 LAB MANUAL BE COMPUTER ENGINEERING
E502024047
E502024047
E502024047
E502024047
Study of Density Based Clustering Techniques on Data Streams
Study of Density Based Clustering Techniques on Data Streams
Ay4201347349
Ay4201347349
J017114852
J017114852
A classification of methods for frequent pattern mining
A classification of methods for frequent pattern mining
G045033841
G045033841
Applying K-Means Clustering Algorithm to Discover Knowledge from Insurance Da...
Applying K-Means Clustering Algorithm to Discover Knowledge from Insurance Da...
CLASSIFICATION ALGORITHM USING RANDOM CONCEPT ON A VERY LARGE DATA SET: A SURVEY
CLASSIFICATION ALGORITHM USING RANDOM CONCEPT ON A VERY LARGE DATA SET: A SURVEY
BI Chapter 04.pdf business business business business
BI Chapter 04.pdf business business business business
Más de Niit Care
Ajs 1 b
Ajs 1 b
Niit Care
Ajs 4 b
Ajs 4 b
Niit Care
Ajs 4 a
Ajs 4 a
Niit Care
Ajs 4 c
Ajs 4 c
Niit Care
Ajs 3 b
Ajs 3 b
Niit Care
Ajs 3 a
Ajs 3 a
Niit Care
Ajs 3 c
Ajs 3 c
Niit Care
Ajs 2 b
Ajs 2 b
Niit Care
Ajs 2 a
Ajs 2 a
Niit Care
Ajs 2 c
Ajs 2 c
Niit Care
Ajs 1 a
Ajs 1 a
Niit Care
Ajs 1 c
Ajs 1 c
Niit Care
Dacj 4 2-c
Dacj 4 2-c
Niit Care
Dacj 4 2-b
Dacj 4 2-b
Niit Care
Dacj 4 2-a
Dacj 4 2-a
Niit Care
Dacj 4 1-c
Dacj 4 1-c
Niit Care
Dacj 4 1-b
Dacj 4 1-b
Niit Care
Dacj 4 1-a
Dacj 4 1-a
Niit Care
Dacj 1-2 b
Dacj 1-2 b
Niit Care
Dacj 1-3 c
Dacj 1-3 c
Niit Care
Más de Niit Care
(20)
Ajs 1 b
Ajs 1 b
Ajs 4 b
Ajs 4 b
Ajs 4 a
Ajs 4 a
Ajs 4 c
Ajs 4 c
Ajs 3 b
Ajs 3 b
Ajs 3 a
Ajs 3 a
Ajs 3 c
Ajs 3 c
Ajs 2 b
Ajs 2 b
Ajs 2 a
Ajs 2 a
Ajs 2 c
Ajs 2 c
Ajs 1 a
Ajs 1 a
Ajs 1 c
Ajs 1 c
Dacj 4 2-c
Dacj 4 2-c
Dacj 4 2-b
Dacj 4 2-b
Dacj 4 2-a
Dacj 4 2-a
Dacj 4 1-c
Dacj 4 1-c
Dacj 4 1-b
Dacj 4 1-b
Dacj 4 1-a
Dacj 4 1-a
Dacj 1-2 b
Dacj 1-2 b
Dacj 1-3 c
Dacj 1-3 c
Último
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
The Digital Insurer
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
UiPathCommunity
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
apidays
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
The Digital Insurer
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
apidays
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Zilliz
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Nanddeep Nachan
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
Overkill Security
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
apidays
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
The Digital Insurer
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
danishmna97
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Orbitshub
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
Último
(20)
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Ds 4
1.
Introduction to Searching
techniques and Matrices Objectives In this lesson, you will learn to: State the algorithm for linear search Perform operations on matrices State the applications of matrices Implement Recursion Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 1 of 32
2.
Introduction to Searching
techniques and Matrices Searching Searching is an operation that returns either: The location of a given item of information A message that the given information is not found Searching algorithm depends on the type of data structure used to store data For example, there can be a data structure with: Faster search operation (sorted array) Faster modification operation (linked list) Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 2 of 32
3.
Introduction to Searching
techniques and Matrices Searching (Contd..) There is a trade-off in these data structures Sorted array insertion and deletion is time consuming Linked list traversal is time-consuming The different searching techniques are: Linear search Binary search Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 3 of 32
4.
Introduction to Searching
techniques and Matrices Linear Search Is the simplest search technique In this technique begin at one end and scan until: The item is found The end of the list is reached Benefits: Can be used on any data structure No restrictions on the way data is arranged Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 4 of 32
5.
Introduction to Searching
techniques and Matrices Linear Search (Contd..) Drawbacks: Performance is dependant on the length of the array Average number of comparisons 1/2(n+1) Even if required data is not present the complete array is searched Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 5 of 32
6.
Introduction to Searching
techniques and Matrices Binary Search Binary search technique is faster than linear search technique After every search the number of items to be searched is reduced by half In this search technique: Start by comparing the middle element Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 6 of 32
7.
Introduction to Searching
techniques and Matrices Binary Search (Contd..) Then the next quarter and so on until The required item is found No more data is left for searching Benefits: Faster search After each step number of items to be searched reduces by half More efficient for searching large volume of data Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 7 of 32
8.
Introduction to Searching
techniques and Matrices Binary Search (Contd..) Average number of comparisons for 1 million items is only 20 Drawbacks: Data has to be sorted Cannot be used on all data structures Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 8 of 32
9.
Introduction to Searching
techniques and Matrices Problem Statement 4.D.1 Write a program to accept 20 numbers and store it in an array. Now accept a number and search it in an array, make sure that, before searching a number you perform bubble sort it in. Note: Implement using arrays Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 9 of 32
10.
Introduction to Searching
techniques and Matrices Just A Minute In a sorted array insertion and deletion are less time consuming than searching.(True/False) In a binary tree searching is more time consuming than linked list ( True/False) Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 10 of 32
11.
Introduction to Searching
techniques and Matrices Matrices A rectangular arrangement of rows and columns is a matrix COLUMNS A B C D E F G H ROWS E F G H I J K L I J K L Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 11 of 32
12.
Introduction to Searching
techniques and Matrices Matrices (Contd..) The size of the matrix is called the dimensions of the matrix The sum of rows and columns of a matrix identify the size Each number in a matrix is called an element Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 12 of 32
13.
Introduction to Searching
techniques and Matrices Matrices (Contd..) A matrix with the same number of rows and columns is called a square matrix A B C E F E F G I J I J K Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 13 of 32
14.
Introduction to Searching
techniques and Matrices Matrices (Contd..) A X D X Z D Z E The above figure shows another type of matrix that is, a sparse matrix A matrix with lot of blank elements is called a sparse matrix Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 14 of 32
15.
Introduction to Searching
techniques and Matrices Operations on Matrices The basic operations on a matrix can be listed as: Create Store Delete Retrieve Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 15 of 32
16.
Introduction to Searching
techniques and Matrices Multi-dimensional Matrix 4 Pages 2 Rows 3 Columns The syntax for declaring a three-dimensional matrix is same as that of two-dimensional array Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 16 of 32
17.
Introduction to Searching
techniques and Matrices Multi-dimensional Matrix (Contd..) Example: int Newone[2][3][4]; The array Newone[2][3][4] contains 2*3*4=24 elements The subscripts of the array are called: row column page Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 17 of 32
18.
Introduction to Searching
techniques and Matrices Multi-dimensional Matrix (Contd..) In this array, we can store 8 different set of details. Sum of row and page gives the number of different sets of information that can be stored Example: 4*2 = 8 for the array Newone Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 18 of 32
19.
Introduction to Searching
techniques and Matrices Applications Matrices can be applied in: Finding the shortest route Map coloring Search engines for the WEB when combined with queues and hash tables Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 19 of 32
20.
Introduction to Searching
techniques and Matrices Problem Statement 4.D.2 Write a program to store the details of a student ( Student name, Registration number, and the Subject marks) in a three-dimensional array. Also, give an option to the user to query and print the details for a specific student requested by the user by entering the registration number of the student. Accept the student data from the user? Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 20 of 32
21.
Introduction to Searching
techniques and Matrices Recursion Whenever a function invokes itself, it is called recursion. Every time a recursive function calls itself, it must call itself with different values. A recursive procedure or function must satisfy the following two conditions: There must be certain values called base values for which the function will not call back itself. Each time the function refers to itself, the arguments passed must be closer to its base value. It is useful in writing clear, short, and simple programs Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 21 of 32
22.
Introduction to Searching
techniques and Matrices Practice Statement 4.P.1 Identify the erroneous step(s) in the following Table A.2 Step 1 0!=1 Step 2 1! =1*1=1 Step 3 2!=2*1=2 Step 4 3! =3x2 =6 Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 22 of 32
23.
Introduction to Searching
techniques and Matrices Just a Minute… The factorial() function will repeatedly invoke itself until the parameter passed to it is _____. When the above function is invoked with a parameter of 5, the factorial() function is invoked ____ times in all. State whether True or False. With large values (say,100) of the parameter passed to the factorial() function, there is a danger of the program crashing. Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 23 of 32
24.
Introduction to Searching
techniques and Matrices Summary In this lesson, you learned that: Information retrieval is one of the most important applications of computers Searching is an operation, which: Returns the location in memory of some given item of information Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 24 of 32
25.
Introduction to Searching
techniques and Matrices Summary (Contd..) The search algorithm depends mainly on the type of data structure we use to store the data in memory In a sorted array the search time can be greatly reduced by using a search technique called binary search In sorted array, there is an overhead-involved that is, insertion and deletion of data is a time-consuming process Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 25 of 32
26.
Introduction to Searching
techniques and Matrices Summary (Contd..) In a linked List: Search time will be high Only sequential search is possible Insertion and deletion will be fast Binary Tree combines the advantage of sorted array and a linked list Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 26 of 32
27.
Introduction to Searching
techniques and Matrices Summary (Contd..) Linear search is also referred to as sequential search is the simplest search technique In Linear Search, to search an item begin at one end of the list and scan down the list until: The desired item is found The end of the list is reached Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 27 of 32
28.
Introduction to Searching
techniques and Matrices Summary (Contd..) The average number of comparison for a linear search can be worked out by applying the formula 1/2(n+1) Linear search technique has some drawbacks: Even if there is no match for the item in the list, the complete list is searched The search time is directly proportional to the length of the list Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 28 of 32
29.
Introduction to Searching
techniques and Matrices Summary (Contd..) Binary search is faster than linear search technique In Binary Search, to search an item begin at the middle of the list and scan one half of the list , then the quarter and so on until: the desired item is found or there is no more data to search In a binary search, after every comparison, the data to be searched reduces by half. Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 29 of 32
30.
Introduction to Searching
techniques and Matrices Summary (Contd..) The drawbacks of binary search are: The list has to be sorted There should be a method to access the middle element of the list A rectangular arrangement of rows and columns is called a matrix A matrix with the same number of rows and columns is called a square matrix A matrix with a lot of zero or unused elements is generally called a sparse matrix Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 30 of 32
31.
Introduction to Searching
techniques and Matrices Summary (Contd..) The basic operations on a matrix can be listed as: Create Store Delete Retrieve The subscripts of a three-dimensional array are called: Row Column Page Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 31 of 32
32.
Introduction to Searching
techniques and Matrices Summary (Contd..) Matrices can be applied for: Finding a shortest route Map coloring Recursion can be defined as defining something in terms of itself. A function is recursive if it makes a call to itself, i.e. invokes itself. Advantage of recursion is that it is useful in writing clear, short, and simple programs. Introduction to Searching techniques and Matrices/Lesson ©NIIT 4/Slide 32 of 32