This document provides an introduction to data structures and algorithms. It discusses arrays, stacks, queues and their applications. It also covers time and space complexity analysis of algorithms. Arrays are introduced as a linear data structure for storing similar data elements. Array elements can be accessed using an index or subscript. Multi-dimensional arrays can also be implemented for storing data in rows and columns.
Bsc cs ii dfs u-1 introduction to data structureRai University
This document provides an introduction to data structures. It defines data structures as a way of organizing and storing data in a computer so it can be used efficiently. The document discusses different types of data structures including primitive, non-primitive, linear and non-linear structures. It provides examples of common data structures like arrays, linked lists, stacks, queues and trees. It also covers important concepts like time and space complexity analysis and Big O notation for analyzing algorithm efficiency.
Mca ii dfs u-1 introduction to data structureRai University
This document provides an introduction to data structures. It defines data structures as a way of organizing and storing data in a computer so that it can be used efficiently. The document discusses different types of data structures including primitive, non-primitive, linear and non-linear structures. It provides examples of various data structures like arrays, linked lists, stacks, queues and trees. It also covers important concepts like time complexity, space complexity and Big O notation for analyzing algorithms. Common operations on data structures like search, insert and delete are also explained.
Bca ii dfs u-1 introduction to data structureRai University
This document provides an introduction to data structures. It defines data structures as a way of organizing and storing data in a computer so it can be used efficiently. There are two main types: primitive data structures like integers and characters that are directly operated on by the CPU, and non-primitive structures like arrays and linked lists that are more complex. Key aspects of data structures covered include operations, properties, performance analysis using time and space complexity, and examples of linear structures like arrays and non-linear structures like trees. Common algorithms are analyzed based on their asymptotic worst-case running times.
The document discusses algorithms, data abstraction, asymptotic analysis, arrays, polynomials, and sparse matrices. It defines algorithms and discusses their advantages and disadvantages. It explains how to design an algorithm and describes iterative and recursive algorithms. It defines data abstraction and gives an example using smartphones. It discusses time and space complexity analysis and different asymptotic notations like Big O, Omega, and Theta. It describes what arrays are, different types of arrays, and applications of arrays. It explains how to represent and add polynomials using linked lists. Finally, it defines sparse matrices and two methods to represent them using arrays and linked lists.
This document provides an introduction to the concept of data structures. It discusses the need for data structures due to increasing data and processing requirements. It defines key terms like abstract data type, algorithm complexity, and different types of data structures. It explains linear data structures like arrays, linked lists, stacks and queues. Non-linear structures like trees and graphs are also introduced. Common operations on data structures like traversing, insertion, deletion, searching and sorting are outlined. The document aims to provide foundational knowledge on data structures and algorithms.
This document outlines a course on programming and data structures in C. It discusses key concepts like abstract data types, asymptotic analysis, various data structures like arrays, stacks, queues, linked lists, trees, and graphs. It covers different algorithms for searching, sorting and indexing of data. The objectives are to learn a program-independent view of data structures and their usage in algorithms. Various data structures, their representations and associated operations are explained. Methods for analyzing algorithms to determine their time and space complexity are also presented.
An algorithm is a finite set of instructions to accomplish a predefined task. Performance of an algorithm is measured by its time and space complexity, with common metrics being big O, big Omega, and big Theta notation. Common data structures include arrays, linked lists, stacks, queues, trees and graphs. Key concepts are asymptotic analysis of algorithms, recursion, and analyzing complexity classes like constant, linear, quadratic and logarithmic time.
The document discusses data structures and algorithms. It defines data structures and different types including primitive and non-primitive structures. It describes operations on data structures like traversing, searching, insertion and deletion. It also defines concepts like abstract data types, asymptotic analysis, and different algorithm analysis methods. Examples provided include linear search algorithm and binary search algorithm in pseudocode and C code.
Bsc cs ii dfs u-1 introduction to data structureRai University
This document provides an introduction to data structures. It defines data structures as a way of organizing and storing data in a computer so it can be used efficiently. The document discusses different types of data structures including primitive, non-primitive, linear and non-linear structures. It provides examples of common data structures like arrays, linked lists, stacks, queues and trees. It also covers important concepts like time and space complexity analysis and Big O notation for analyzing algorithm efficiency.
Mca ii dfs u-1 introduction to data structureRai University
This document provides an introduction to data structures. It defines data structures as a way of organizing and storing data in a computer so that it can be used efficiently. The document discusses different types of data structures including primitive, non-primitive, linear and non-linear structures. It provides examples of various data structures like arrays, linked lists, stacks, queues and trees. It also covers important concepts like time complexity, space complexity and Big O notation for analyzing algorithms. Common operations on data structures like search, insert and delete are also explained.
Bca ii dfs u-1 introduction to data structureRai University
This document provides an introduction to data structures. It defines data structures as a way of organizing and storing data in a computer so it can be used efficiently. There are two main types: primitive data structures like integers and characters that are directly operated on by the CPU, and non-primitive structures like arrays and linked lists that are more complex. Key aspects of data structures covered include operations, properties, performance analysis using time and space complexity, and examples of linear structures like arrays and non-linear structures like trees. Common algorithms are analyzed based on their asymptotic worst-case running times.
The document discusses algorithms, data abstraction, asymptotic analysis, arrays, polynomials, and sparse matrices. It defines algorithms and discusses their advantages and disadvantages. It explains how to design an algorithm and describes iterative and recursive algorithms. It defines data abstraction and gives an example using smartphones. It discusses time and space complexity analysis and different asymptotic notations like Big O, Omega, and Theta. It describes what arrays are, different types of arrays, and applications of arrays. It explains how to represent and add polynomials using linked lists. Finally, it defines sparse matrices and two methods to represent them using arrays and linked lists.
This document provides an introduction to the concept of data structures. It discusses the need for data structures due to increasing data and processing requirements. It defines key terms like abstract data type, algorithm complexity, and different types of data structures. It explains linear data structures like arrays, linked lists, stacks and queues. Non-linear structures like trees and graphs are also introduced. Common operations on data structures like traversing, insertion, deletion, searching and sorting are outlined. The document aims to provide foundational knowledge on data structures and algorithms.
This document outlines a course on programming and data structures in C. It discusses key concepts like abstract data types, asymptotic analysis, various data structures like arrays, stacks, queues, linked lists, trees, and graphs. It covers different algorithms for searching, sorting and indexing of data. The objectives are to learn a program-independent view of data structures and their usage in algorithms. Various data structures, their representations and associated operations are explained. Methods for analyzing algorithms to determine their time and space complexity are also presented.
An algorithm is a finite set of instructions to accomplish a predefined task. Performance of an algorithm is measured by its time and space complexity, with common metrics being big O, big Omega, and big Theta notation. Common data structures include arrays, linked lists, stacks, queues, trees and graphs. Key concepts are asymptotic analysis of algorithms, recursion, and analyzing complexity classes like constant, linear, quadratic and logarithmic time.
The document discusses data structures and algorithms. It defines data structures and different types including primitive and non-primitive structures. It describes operations on data structures like traversing, searching, insertion and deletion. It also defines concepts like abstract data types, asymptotic analysis, and different algorithm analysis methods. Examples provided include linear search algorithm and binary search algorithm in pseudocode and C code.
data structures using C 2 sem BCA univeristy of mysoreambikavenkatesh2
The document discusses reallocating memory using the realloc() function in C. It provides code to allocate memory for an integer array, print the memory addresses, reallocate the array to a larger size, and print the new memory addresses. The memory addresses for the previously allocated blocks do not change after reallocating, but new contiguous blocks are added to increase the array size.
A data structure is a way of storing data in computer memory so that it can be retrieved and manipulated efficiently. There are two main categories of data structures: linear and non-linear. Linear data structures include arrays, stacks, and queues where elements are stored in a linear order. Non-linear structures include trees and graphs where elements are not necessarily in a linear order. Common operations on data structures include traversing, searching, insertion, deletion, sorting, and merging. Algorithms use data structures to process and solve problems in an efficient manner.
In our thesis work, we try to find out the efficiency of several sorting algorithms and generate a comparative report according to performance, based on experimental data size and data order for all algorithm. To do this we have researched, analyzed about 9 different types of well-known sorting algorithms. We convert the algorithms to programmable code, compile and run with different set of data. We keep the sorting algorithm’s description as it is. We give focus on, how the algorithms work, considering their total operation count (assignment count, comparison count) and complexity based on our same data set for all algorithm. We write programming code for each sorting algorithm in C programming language. In our investigation, we have also worked with big and small data for different cases (ordered, pre-ordered, random, disordered) and put their result in different tables. We show the increasing ratio to compare the result. we also show the data in graphical chart for view comparative report in same window. We mark their efficiency with point and ranked them. At last we discussed their result of efficiency in a single table. We modify the merge sort and try to make an improved tri-merge sorting algorithm that is more efficient than marge sort. Theoretically if we divide and conquer with higher number its result is better, some paper exists on it, but to manage the algorithm, there cost lot of operations count. Like, if we consider quadratic divide-conquer, its manage complexly is huge than binary divide-conquer that why we generally use binary merge. We found trimerge is theoretically and practically true based on investigation data set. Tri-marge take some more compare operation for manage and sort when data remain 1 or 2 at last stage, whereas binary merge don’t need such compare. But for big data size tri-merge gain lot of operation count that give significant result that declare tri-merge is more efficient than merge sort algorithm. We also experiment with penta-merge algorithm which give more better result but algorithm and implementation is too complex.
We shall try to define the tri-merge algorithm so that it can be used to implement in any
programming language. It will help students, researchers to use the algorithm, as like we
got the various algorithm structure over the internet.
This document discusses algorithms and their complexity. It provides an example of a linear search algorithm to find a target value in an array. The complexity of this algorithm is analyzed for the worst and average cases. In the worst case, the target is the last element and all n elements must be checked, resulting in O(n) time complexity. On average, about half the elements (n+1)/2 need to be checked, resulting in average time complexity of O(n).
The document discusses data structures and algorithms. It defines a data structure as a particular way of organizing data in a computer so that it can be used efficiently. Common data structures include arrays, stacks, queues, linked lists, trees, heaps, and hash tables. An algorithm is defined as a finite set of instructions to accomplish a particular task. Analyzing algorithms involves determining how resources like time and storage change with input size. Key considerations in algorithm design include requirements, analysis, data objects, operations, refinement, coding, verification, and testing.
This document provides an introduction to data structures and algorithms. It defines data structures as organized ways to store and access data to enable efficient operations. Common data structures include linked lists, trees, graphs, and stacks and queues. The document also defines algorithms as step-by-step instructions to solve problems and discusses ways to analyze their time and space complexity, such as using Big O notation. Specific algorithms covered include bubble sort, insertion sort, and quicksort.
The document discusses data structures and algorithms. It defines arrays as a series of objects of the same size and type, where each object is an element that can be accessed via an index. Algorithms are described as finite sequences of instructions to solve problems, with analysis of algorithms determining the resources like time and storage required.
Introduction to data structures and complexity.pptxPJS KUMAR
The document discusses data structures and algorithms. It defines data structures as the logical organization of data and describes common linear and nonlinear structures like arrays and trees. It explains that the choice of data structure depends on accurately representing real-world relationships while allowing effective processing. Key data structure operations are also outlined like traversing, searching, inserting, deleting, sorting, and merging. The document then defines algorithms as step-by-step instructions to solve problems and analyzes the complexity of algorithms in terms of time and space. Sub-algorithms and their use are also covered.
The document discusses asymptotic analysis and algorithm complexity. It defines asymptotic notations like Big-O, Omega, and Theta notations which are used to describe the time complexity of algorithms. Big-O gives the upper bound/worst case, Omega gives the lower bound/best case, and Theta gives both upper and lower bounds for average case. It also discusses space and time complexity analysis of algorithms and different types of time complexities including constant, logarithmic, linear, quadratic, and nlogn time. Finally, it covers arrays, types of arrays, dynamic memory allocation functions in C like malloc, calloc, free, and realloc.
The document discusses various data structures used in programming, including arrays, lists, linked lists, stacks, queues, and dictionaries. It provides definitions and summaries of each data structure, including their common operations and time complexities. For example, it notes that arrays provide O(1) direct access by index but fixed size, while lists are dynamically sized but insertion/deletion at non-end positions is O(n).
Performance analysis and randamized agorithamlilyMalar1
The document discusses performance analysis of algorithms in terms of space and time complexity. It provides examples to show how to calculate the space and time complexity of algorithms. Specifically, it analyzes the space and time complexity of a sum algorithm. For space complexity, it identifies the fixed and variable components, showing the space complexity is O(n). For time complexity, it analyzes the number of steps and their frequency to determine the time complexity is O(2n+3). The document also discusses other algorithm analysis topics like asymptotic notations, amortized analysis, and randomized algorithms.
This document provides an overview of data structures and algorithms. It discusses key concepts like interfaces, implementations, time complexity, space complexity, asymptotic analysis, and common control structures. Some key points:
- A data structure organizes data to allow for efficient operations. It has an interface defining operations and an implementation defining internal representation.
- Algorithm analysis considers best, average, and worst case time complexities using asymptotic notations like Big O. Space complexity also measures memory usage.
- Common control structures include sequential, conditional (if/else), and repetitive (loops) structures that control program flow based on conditions.
Study on Sorting Algorithm and Position Determining SortIRJET Journal
This document presents a study on sorting algorithms and proposes a new position determining sort algorithm. It begins with an introduction to sorting concepts and common sorting algorithms like selection sort, quicksort, and mergesort. It then describes the proposed algorithm, which uses a divide-and-conquer approach similar to selection sort but aims to reduce the number of comparisons. The algorithm maintains an additional array to track sorted locations. It analyzes the time and space complexity of the proposed algorithm, finding it has O(n^2) time complexity like selection sort. The document concludes the algorithm was implemented and tested but has room for improving memory usage.
The document discusses the fundamentals of algorithms and data structures. It covers key topics like algorithm analysis, asymptotic notation, different data structures like arrays, stacks, queues, linked lists, trees, graphs and their applications. It also discusses storage management techniques like lists and garbage collection. The course aims to teach students important algorithm design techniques and how to evaluate algorithms based on parameters like time complexity, space complexity and efficiency.
This document discusses recurrence relations, time complexity, binary search algorithms, and space complexity. It provides examples and explanations of each topic. For recurrence relations, it explains that a recurrence relates a term to its predecessors and they are useful for counting problems. It then discusses time complexity by defining it as the total time required for an algorithm to execute and providing an example calculation. Finally, it introduces binary search, explaining that it has logarithmic time complexity and works on sorted data, then provides pseudocode to implement binary search.
This document summarizes an internship project on data structures and algorithms. It covers topics like asymptotic notation, time complexity, arrays, trees, linked lists, stacks, queues, graphs, searching, sorting, and recursion algorithms. Examples of various data structures and their operations are explained along with analyzing their time complexities. Qualities of good algorithms and different types of searching and sorting algorithms are also discussed.
This document summarizes a massive open online course on Udemy about fundamental data structures and algorithms using the C language. The 15-hour course covers key topics like stacks, queues, linked lists, trees, recursion, and analyzing algorithm efficiency. It aims to help students strengthen programming skills and prepare for technical interviews at top companies. The course consists of 14 sections and includes weekly quizzes on the Udemy platform.
This document provides an overview of arrays and linked lists as data structures. It discusses arrays, including declaration, initialization, updating elements, and multi-dimensional arrays. It also covers searching arrays, why arrays are needed, pros and cons of arrays, and character strings as arrays. The document then introduces linked lists as a data structure and discusses linked list operations like printing all elements, adding nodes, appending nodes, inserting nodes, and deleting nodes. Homework questions on arrays and linked lists are provided at the end.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
data structures using C 2 sem BCA univeristy of mysoreambikavenkatesh2
The document discusses reallocating memory using the realloc() function in C. It provides code to allocate memory for an integer array, print the memory addresses, reallocate the array to a larger size, and print the new memory addresses. The memory addresses for the previously allocated blocks do not change after reallocating, but new contiguous blocks are added to increase the array size.
A data structure is a way of storing data in computer memory so that it can be retrieved and manipulated efficiently. There are two main categories of data structures: linear and non-linear. Linear data structures include arrays, stacks, and queues where elements are stored in a linear order. Non-linear structures include trees and graphs where elements are not necessarily in a linear order. Common operations on data structures include traversing, searching, insertion, deletion, sorting, and merging. Algorithms use data structures to process and solve problems in an efficient manner.
In our thesis work, we try to find out the efficiency of several sorting algorithms and generate a comparative report according to performance, based on experimental data size and data order for all algorithm. To do this we have researched, analyzed about 9 different types of well-known sorting algorithms. We convert the algorithms to programmable code, compile and run with different set of data. We keep the sorting algorithm’s description as it is. We give focus on, how the algorithms work, considering their total operation count (assignment count, comparison count) and complexity based on our same data set for all algorithm. We write programming code for each sorting algorithm in C programming language. In our investigation, we have also worked with big and small data for different cases (ordered, pre-ordered, random, disordered) and put their result in different tables. We show the increasing ratio to compare the result. we also show the data in graphical chart for view comparative report in same window. We mark their efficiency with point and ranked them. At last we discussed their result of efficiency in a single table. We modify the merge sort and try to make an improved tri-merge sorting algorithm that is more efficient than marge sort. Theoretically if we divide and conquer with higher number its result is better, some paper exists on it, but to manage the algorithm, there cost lot of operations count. Like, if we consider quadratic divide-conquer, its manage complexly is huge than binary divide-conquer that why we generally use binary merge. We found trimerge is theoretically and practically true based on investigation data set. Tri-marge take some more compare operation for manage and sort when data remain 1 or 2 at last stage, whereas binary merge don’t need such compare. But for big data size tri-merge gain lot of operation count that give significant result that declare tri-merge is more efficient than merge sort algorithm. We also experiment with penta-merge algorithm which give more better result but algorithm and implementation is too complex.
We shall try to define the tri-merge algorithm so that it can be used to implement in any
programming language. It will help students, researchers to use the algorithm, as like we
got the various algorithm structure over the internet.
This document discusses algorithms and their complexity. It provides an example of a linear search algorithm to find a target value in an array. The complexity of this algorithm is analyzed for the worst and average cases. In the worst case, the target is the last element and all n elements must be checked, resulting in O(n) time complexity. On average, about half the elements (n+1)/2 need to be checked, resulting in average time complexity of O(n).
The document discusses data structures and algorithms. It defines a data structure as a particular way of organizing data in a computer so that it can be used efficiently. Common data structures include arrays, stacks, queues, linked lists, trees, heaps, and hash tables. An algorithm is defined as a finite set of instructions to accomplish a particular task. Analyzing algorithms involves determining how resources like time and storage change with input size. Key considerations in algorithm design include requirements, analysis, data objects, operations, refinement, coding, verification, and testing.
This document provides an introduction to data structures and algorithms. It defines data structures as organized ways to store and access data to enable efficient operations. Common data structures include linked lists, trees, graphs, and stacks and queues. The document also defines algorithms as step-by-step instructions to solve problems and discusses ways to analyze their time and space complexity, such as using Big O notation. Specific algorithms covered include bubble sort, insertion sort, and quicksort.
The document discusses data structures and algorithms. It defines arrays as a series of objects of the same size and type, where each object is an element that can be accessed via an index. Algorithms are described as finite sequences of instructions to solve problems, with analysis of algorithms determining the resources like time and storage required.
Introduction to data structures and complexity.pptxPJS KUMAR
The document discusses data structures and algorithms. It defines data structures as the logical organization of data and describes common linear and nonlinear structures like arrays and trees. It explains that the choice of data structure depends on accurately representing real-world relationships while allowing effective processing. Key data structure operations are also outlined like traversing, searching, inserting, deleting, sorting, and merging. The document then defines algorithms as step-by-step instructions to solve problems and analyzes the complexity of algorithms in terms of time and space. Sub-algorithms and their use are also covered.
The document discusses asymptotic analysis and algorithm complexity. It defines asymptotic notations like Big-O, Omega, and Theta notations which are used to describe the time complexity of algorithms. Big-O gives the upper bound/worst case, Omega gives the lower bound/best case, and Theta gives both upper and lower bounds for average case. It also discusses space and time complexity analysis of algorithms and different types of time complexities including constant, logarithmic, linear, quadratic, and nlogn time. Finally, it covers arrays, types of arrays, dynamic memory allocation functions in C like malloc, calloc, free, and realloc.
The document discusses various data structures used in programming, including arrays, lists, linked lists, stacks, queues, and dictionaries. It provides definitions and summaries of each data structure, including their common operations and time complexities. For example, it notes that arrays provide O(1) direct access by index but fixed size, while lists are dynamically sized but insertion/deletion at non-end positions is O(n).
Performance analysis and randamized agorithamlilyMalar1
The document discusses performance analysis of algorithms in terms of space and time complexity. It provides examples to show how to calculate the space and time complexity of algorithms. Specifically, it analyzes the space and time complexity of a sum algorithm. For space complexity, it identifies the fixed and variable components, showing the space complexity is O(n). For time complexity, it analyzes the number of steps and their frequency to determine the time complexity is O(2n+3). The document also discusses other algorithm analysis topics like asymptotic notations, amortized analysis, and randomized algorithms.
This document provides an overview of data structures and algorithms. It discusses key concepts like interfaces, implementations, time complexity, space complexity, asymptotic analysis, and common control structures. Some key points:
- A data structure organizes data to allow for efficient operations. It has an interface defining operations and an implementation defining internal representation.
- Algorithm analysis considers best, average, and worst case time complexities using asymptotic notations like Big O. Space complexity also measures memory usage.
- Common control structures include sequential, conditional (if/else), and repetitive (loops) structures that control program flow based on conditions.
Study on Sorting Algorithm and Position Determining SortIRJET Journal
This document presents a study on sorting algorithms and proposes a new position determining sort algorithm. It begins with an introduction to sorting concepts and common sorting algorithms like selection sort, quicksort, and mergesort. It then describes the proposed algorithm, which uses a divide-and-conquer approach similar to selection sort but aims to reduce the number of comparisons. The algorithm maintains an additional array to track sorted locations. It analyzes the time and space complexity of the proposed algorithm, finding it has O(n^2) time complexity like selection sort. The document concludes the algorithm was implemented and tested but has room for improving memory usage.
The document discusses the fundamentals of algorithms and data structures. It covers key topics like algorithm analysis, asymptotic notation, different data structures like arrays, stacks, queues, linked lists, trees, graphs and their applications. It also discusses storage management techniques like lists and garbage collection. The course aims to teach students important algorithm design techniques and how to evaluate algorithms based on parameters like time complexity, space complexity and efficiency.
This document discusses recurrence relations, time complexity, binary search algorithms, and space complexity. It provides examples and explanations of each topic. For recurrence relations, it explains that a recurrence relates a term to its predecessors and they are useful for counting problems. It then discusses time complexity by defining it as the total time required for an algorithm to execute and providing an example calculation. Finally, it introduces binary search, explaining that it has logarithmic time complexity and works on sorted data, then provides pseudocode to implement binary search.
This document summarizes an internship project on data structures and algorithms. It covers topics like asymptotic notation, time complexity, arrays, trees, linked lists, stacks, queues, graphs, searching, sorting, and recursion algorithms. Examples of various data structures and their operations are explained along with analyzing their time complexities. Qualities of good algorithms and different types of searching and sorting algorithms are also discussed.
This document summarizes a massive open online course on Udemy about fundamental data structures and algorithms using the C language. The 15-hour course covers key topics like stacks, queues, linked lists, trees, recursion, and analyzing algorithm efficiency. It aims to help students strengthen programming skills and prepare for technical interviews at top companies. The course consists of 14 sections and includes weekly quizzes on the Udemy platform.
This document provides an overview of arrays and linked lists as data structures. It discusses arrays, including declaration, initialization, updating elements, and multi-dimensional arrays. It also covers searching arrays, why arrays are needed, pros and cons of arrays, and character strings as arrays. The document then introduces linked lists as a data structure and discusses linked list operations like printing all elements, adding nodes, appending nodes, inserting nodes, and deleting nodes. Homework questions on arrays and linked lists are provided at the end.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
How to Fix the Import Error in the Odoo 17Celine George
An import error occurs when a program fails to import a module or library, disrupting its execution. In languages like Python, this issue arises when the specified module cannot be found or accessed, hindering the program's functionality. Resolving import errors is crucial for maintaining smooth software operation and uninterrupted development processes.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPRAHUL
This Dissertation explores the particular circumstances of Mirzapur, a region located in the
core of India. Mirzapur, with its varied terrains and abundant biodiversity, offers an optimal
environment for investigating the changes in vegetation cover dynamics. Our study utilizes
advanced technologies such as GIS (Geographic Information Systems) and Remote sensing to
analyze the transformations that have taken place over the course of a decade.
The complex relationship between human activities and the environment has been the focus
of extensive research and worry. As the global community grapples with swift urbanization,
population expansion, and economic progress, the effects on natural ecosystems are becoming
more evident. A crucial element of this impact is the alteration of vegetation cover, which plays a
significant role in maintaining the ecological equilibrium of our planet.Land serves as the foundation for all human activities and provides the necessary materials for
these activities. As the most crucial natural resource, its utilization by humans results in different
'Land uses,' which are determined by both human activities and the physical characteristics of the
land.
The utilization of land is impacted by human needs and environmental factors. In countries
like India, rapid population growth and the emphasis on extensive resource exploitation can lead
to significant land degradation, adversely affecting the region's land cover.
Therefore, human intervention has significantly influenced land use patterns over many
centuries, evolving its structure over time and space. In the present era, these changes have
accelerated due to factors such as agriculture and urbanization. Information regarding land use and
cover is essential for various planning and management tasks related to the Earth's surface,
providing crucial environmental data for scientific, resource management, policy purposes, and
diverse human activities.
Accurate understanding of land use and cover is imperative for the development planning
of any area. Consequently, a wide range of professionals, including earth system scientists, land
and water managers, and urban planners, are interested in obtaining data on land use and cover
changes, conversion trends, and other related patterns. The spatial dimensions of land use and
cover support policymakers and scientists in making well-informed decisions, as alterations in
these patterns indicate shifts in economic and social conditions. Monitoring such changes with the
help of Advanced technologies like Remote Sensing and Geographic Information Systems is
crucial for coordinated efforts across different administrative levels. Advanced technologies like
Remote Sensing and Geographic Information Systems
9
Changes in vegetation cover refer to variations in the distribution, composition, and overall
structure of plant communities across different temporal and spatial scales. These changes can
occur natural.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
2. UNIT I
Introduction to Algorithm Design and Data Structure: Design & analysis of algorithm,
Top-down and Bottom-up approaches to algorithm design, Analysis of Algorithm,
Frequency count, Complexity measures in terms of time and space.
Arrays, Stacks and Queues : Representation of Array (Single & Multi Dimensional
Arrays), Address Calculation using column & row major Ordering, Array and linked
representation and implementation of queues. Applications of Arrays, Stacks & Queues;
Conversion from Infix to Postfix & Prefix and Evaluation of Prefix expressions using
Stack, Array and linked representation and implementation of queues, Operations on
Queue: Create, Add, Delete, Full and Empty. Circular queue, Deque and Priority Queue
3. Data and Information
Data is the collection of facts and statistics put together for reference or analysis.
Data means any value or set of values for an item/entity . All the real world things are
represented by some values(data).
Note : Data may not be understandable
Ex 23, Prakash, 34, Umesh, 23000.
Ex 4, 8, 16, 32, 64,
4. Data and Information
Information is processed Data
Information is a meaningful arrangement of data such that it makes sense.
Common definition is :- facts provided or learned about something or someone is information
Information is able to answer what, why, where, how and when
Ex Prakash age 23 and Umesh age 34 work in a company and earn Rs 23000 per month.
Who? Where? What?
5.
6. Data Structures
This organization of data into fields, records and files is not efficient
enough to process certain collection of data. Thus data are organized in
more complex structures.
Study of this organization of data is called Data Structure.
Def: - Data structure is a data organization, management, and storage
format that enables efficient access and modification. More precisely, a data
structure is a collection of data values, the relationships among them, and
the functions or operations that can be applied to the data.
8. Algorithm
A process or set of rules to be followed in
calculations or other problem-solving
operations, especially by a computer.
Algorithm is a step-by-step finite sequence of
instruction, to solve a well-defined
computational problem.
Ex driving a car, making tea, taking a bus,
hiring a cab, writing a program
9. Data Structure is the structural representation of logical relationships between
elements of data.
Data Structure = Organized Data + Operations
Data Structure + Algorithm = Program
Algorithm is a step-by-step finite sequence of instruction, to solve a well-defined
computational problem.
• Data Structure (In Memory) = Storage Structure
• Data Structure (In Auxiliary Memory) = File Structure
Complexity Analysis of Algorithm
Time Complexity Space Complexity
11. Time Complexity
How much time does a program takes to run?
How we can decide the time taken by a algorithm?
Is the time dependent on the processing speed of the computer system?
Is the time dependent on the variable used in the program?
Or is the running time is dependent on the way the program is written
Yes, the time complexity is inversely proportional to the space, the more elaborated the program is the less time
it will take to run.
12. Example (Time Complexity)
⚫ Let us now rewrite the above algorithm in the form of
a flow-chart using very basic operations (see Fig. 1.7).
We will pretend that each of these operations takes
the same time to execute on a computer. This is not
precisely true but neither is it wildly false.
⚫ Now we can start timing the algorithm. We just want
to count how many times each box is executed. Boxes
A and B are only executed once. Boxes C, E and F are
on a loop that the program goes round n - 1 times, so
each of these is executed n - 1 times. That leaves box
D. This is where all our problems come.
⚫ Consider the list (4,5,3,6,1,2). As the algorithm scans
along this it will start with min=4. It will then do a
`detour' on the third element to make min=3 and it
will make a final detour on the fifth element to give
min its final value of 1. In all the box D gets executed
twice.
⚫ On the other hand, if we apply the algorithm to the list
(1,4,3,6,2,5) the detour box D will never be executed.
min will get its correct value right at the start and will
never need to be updated.
13. Cont..
This is our problem. There is no fixed value for the number of detours. It depends entirely on the
list being processed. We can make three obvious statements about the value d of the number of
detours:
First, the minimum value of d is zero. This will occur whenever the list has its smallest element
in first place.
Second, the maximum value of d for a list of n elements is n - 1. This will occur when the list is
in strictly decreasing order, so that the current value of the minimum has to be updated on each
step.
Thirdly, for lists of n elements d can take any value between these extremes (exercise).
These comments allow us to make the following statement. Suppose each box in the flow chart
takes unit time to execute. Then the time T(n) taken by the algorithm to find the minimum of n
numbers lies in the range
3(n - 1) + 2 <=T(n)<= 3(n - 1) + 2 + (n - 1)
or
3n - 1 <=T(n) <=4n - 2
For many purposes this might be all that you need to know. The timing is roughly proportional
to the number of elements in the list, allowing for some variation due to the different number of
detours made for different lists.
14. Time Complexity
⚫ Time complexity of an algorithm signifies the
total time required by the program to run till its
completion.
⚫ It includes, loading, linking, jumping time of variables
along with execution time of program.
⚫ It is generally represented in Big Oh (O) notation
15. Asymptotic Notations
⚫ Asymptotic notations are the mathematical notations
used to describe the running time of an algorithm when
the input tends towards a particular value or a limiting
value.
16. Omega Notation (Ω-notation)
Omega notation represents the
lower bound of the running
time of an algorithm. Thus, it
provides best case complexity
of an algorithm.
17. Big-O Notation (O-notation)
Big-O notation represents the upper
bound of the running time of an
algorithm. Thus, it gives the worst
case complexity of an algorithm.
18. Theta notation encloses the
function from above and below.
Since it represents the upper and
the lower bound of the running
time of an algorithm, it is used
for analyzing the average case
complexity of an algorithm.
Theta Notation (Θ-notation)
19. Space Complexity
⚫ Space complexity is a measure of the amount of working
storage an algorithm needs. That means how much memory, in
the worst case, is needed at any point in the algorithm.
⚫ It includes the memory occupied by the variables, constants,
and other pre included files.
⚫ It is represented in the memory units eg. Bytes
20. Time and Space Tradeoff
⚫ The time and space complexity are inversely proportional to each other that
means if the time taken by a program is to be reduced the space occupied by
it will increase.
T∝
1
𝑆
22. Arrays
Definition: A contiguous storage structure having same type
of elements.
a[1] a[2] ………………………………………………..a[n]
• Name of an array represents the address of the array called base address.
•There may be more than ONE Dimensional array, such as TWO Dimensional,
Three Dimensional etc.
•Two dimension array is an example of Matrices. They are represented as a[m][n],
where m is number of rows and n is number of column.
23. Array
⚫ Address Calculation of an Array:
->Single Dimension:
Address of first element is Base address which is also name of the array.
Address of kth element i.e a[k]
:=base address+(k-1)=addr(a)+(k-1)
->Two Dimension:Multi Dimesions array are also stored sequentially in memory,i.e in a linear fashion not like
matrices as we assume.
There are two ways to store them depending on the programming Language:
1)Row Major:In this way first all the elements of first row is stored ,then elements of second row and so on in a
linear fashion.
Eg : a[m][n]
Address of a[ j ][ k ]=addrs(a)+((j-i)n+(k-1))
2)Column Major:
Address of a[ j ][ k ]=addrs(a)+((k-1)m + (j-1))
24. Arrays
⚫ An array is a collection of data elements that are of the
same type (e.g., a collection of integers, collection of
characters, collection of doubles).
26. Array Applications
⚫ Given a list of test scores, determine the
maximum and minimum scores.
⚫ Read in a list of student names and rearrange
them in alphabetical order (sorting).
⚫ Given the height measurements of students in a
class, output the names of those students who are
taller than average.
27. Array Declaration
⚫ Syntax in c:
<type> <arrayName>[<array_size>]
Ex. int Ar[10];
⚫ The array elements are all values of the type <type>.
⚫ The size of the array is indicated by <array_size>, the
number of elements in the array.
⚫ <array_size> must be an int constant or a constant
expression. Note that an array can have multiple dimensions.
29. Subscripting
⚫ Declare an array of 10 integers:
int Ar[10]; // array of 10 ints
⚫ To access an individual element we must apply a subscript to array
named Ar.
⚫ A subscript is a bracketed expression.
⚫ The expression in the brackets is known as the index.
⚫ First element of array has index 0.
Ar[0]
⚫ Second element of array has index 1, and so on.
Ar[1], Ar[2], Ar[3],…
⚫ Last element has an index one less than the size of the array.
Ar[9]
⚫ Incorrect indexing is a common error.
33. Initializing arrays with random values
The following loop initializes the array myList with random values
between 0 and 99:
for (int i = 0; i < ARRAY_SIZE; i++)
{
myList[i] = rand() % 100;
}
34. Program with Arrays
int main()
{
int values[5]= {0,1,3,6,10};
for (int i = 1; i < 5; i++)
{
values[i] = values[i] + values[i-1];
}
values[0] = values[1] + values[4];
}
35. Printing arrays
To print an array, you have to print each element in the array using a
loop like the following:
for (int i = 0; i < ARRAY_SIZE; i++)
{
printf(“%d”,myList[i]);
}
37. Summing All Elements
Use a variable named total to store the sum. Initially total is 0. Add
each element in the array to total using a loop like this:
double total = 0;
for (int i = 0; i < ARRAY_SIZE; i++)
{
total += myList[i];
}
38. Finding the Largest Element
Use a variable named max to store the largest element. Initially max
is myList[0]. To find the largest element in the array myList,
compare each element in myList with max, update max if the
element is greater than max.
double max = myList[0];
for (int i = 1; i < ARRAY_SIZE; i++)
{
if (myList[i] > max) max = myList[i];
}
39. Finding the smallest index of the largest
element
double max = myList[0];
int indexOfMax = 0;
for (int i = 1; i < ARRAY_SIZE; i++)
{
if (myList[i] > max)
{
max = myList[i];
indexOfMax = i;
}
}
40. Shifting Elements
double temp = myList[0]; // Retain the first element
// Shift elements left
for (int i = 1; i < myList.length; i++)
{
myList[i - 1] = myList[i];
}
// Move the first element to fill in the last position
myList[myList.length - 1] = temp;
42. STACK
The word “stack” is chosen by analogy with a stack of plates, where the last
one placed on the top of the stack is usually the first one to be used. Thus a
stack implements a “last in first out” ordering on a set of items.
43. Stack : Definition
Def 1 : A Stack is a list of elements in which elements may be
inserted or deleted only at one end, called top of the stack. Thus
elements are removed from a stack in reverse order in which they
are inserted
Def 2 : A Stack is a non-primitive linear data structure (LIFO).
It is an ordered collections of items where insertion and deletion
take place at one end only called top of stack (TOS).
44. Operations on Stack
A stack is a collection of elements or items, for which the
following operations are defined:
create(S) creates an empty stack S;
isEmpty(S) is a predicate that returns ``true'' if S exists and is
empty, and ``false'' otherwise;
push(S,item) adds the given item to the stack S
pop(S) removes the most recently added item from the stack S
and returns it as the value of the function.
45. Push and Pop
Push:Insert an element
at Top of the stack.
Pop:Removes an
element from top of the
stack.
50. Push and Pop
Push(Algo);
Step1:If top=Max-1,then print
Overflow and return.
Step 2:Top=Top+1
Step 3;Stack[Top]=item
Pop(Algo):
Step1:If Top=-1 then print
underflow and return
Step 2:item=stack[Top]
Step 3:Top=Top-1
51. Peep and Change
Occasionally stack is permitted to have two more options
namely, peep() and change().
In peep() function we are allowed to copy value of any
position in the stack
In change() function we are allowed to change a value of
any position in the stack.
But in both the cases the stack size remains intact.
52. Applications of Stack
Calling of a function/Recursion
Compiler: Parsing
Evaluation of algebraic expressions
Undo/redo in a software
Backward /forward in browser
Calculating factorial
Reversing a list
Counter in a program
Number of turn in a game
53. Queue
Definition: Queue is a list of elements in which elements are
inserted at one end called REAR and deleted from other end
called FRONT.
55. Queue
A queue is a collection of elements, or items, for which the following operations are
defined:
create(Q) creates an empty queue Q;
isEmpty(Q) is a predicate that returns ``true'' if Q exists and is empty, and ``false''
otherwise;
insert(Q,item) adds the given item to the queue Q;
delete(Q) removes from the queue Q the least recently added item that remains in
the queue, and returns it as the value of the function
56. ⚫The data structure queue can be considered as the processing by
FIRST IN FIRST OUT technique, commonly known as FIFO.
⚫Insertion Algo:
if(rear==max-1)
then print(“Overflow)
else
rear=rear+1;
queue[rear]=item;
Queue
58. Problem
⚫The major problem in the above implementation is that
whenever we remove an element from the queue, front
will increment and the location used by the element
cannot be used again. This problem can be solved if we
shift all the elements to the left by one location on every
delete operation. This will be very time consuming and is
not the effective way of solving the problem.
59. Circular Queue
⚫The above problem can be solved only when the first
position in the array will be logically the next position
of the last position of the array. By this way we can
say that the array is circular in nature because every
position in the array will have logical next position in
the array. The queue, which we are going to handle,
using this approach is called the circular queue.
Remember that it is not the infinite queue but we
reuse the empty locations effectively.
63. Infix to post fix
Rule
Write operand , push operator
When opening bracket ( is met - push
When closing bracket ) is met – pop until opening bracket
is met
Do above steps until expression is finished
Note : expressions are evaluated using BODMAS rule
64. Infix to pre fix
Rule
Reverse the string
Find post fix notation
Reverse the string
66. Infix to Postfix
b - ( a + b ) * { ( c – d ) / ( a + a ) }
1. b is operand, write b.
2. On -, Stack being empty, push.
3. On (, push.
4. On a, operand, Hence write a.
5. On +, Stack being (, push. +
6. On b, operand, Hence write b.
7. On ) , pop till (, and then print.
8. Therefore pop +, print +.
)
+
(
-
bab+
-
67. b - ( a + b ) * { ( c – d ) / (a + a) }
9. On *, Stack being -, push *
10. On {, push {
11. On (, push (
12. On C, operand, Hence print C.
13. On -, push-.
14. On d, operand, Hence print d.
15. On ) , pop till (, and then print.
16. Therefore pop -, print -.
17. On /, push /
18. On (, Push(
19. On a, operand, Hence print a.
)
-
(
{
*
-
bab+cd-a
(
/
{
*
-
68. b - ( a + b ) * { ( c – d ) / (a + a) }
20. On +, stack being (, push +
21. On a, operand, Hence print a.
22. On ), pop till (, and then print +
23. On }, pop till {, and then print /
24. End of the Infix expression.
25. pop all and print, Hence print *. And then
print -.
26. Therefore the generated postfix expression
is
)
+
(
/
{
*
-
bab+cd-aa+/*-
}
/
{
*
-
69. Infix to prefix
b - ( a + b ) * { ( c – d ) / (a + a) }
Reverse
{ ( a + a ) / ( d – c ) } * ( b + a ) - b )
+
(
{
aa+dc-/ba+b-*
Reverse
*-b+ab/-cd+aa
}
/
{
)
-
(
/
{
)
+
(
*
I II III IV V
-
*
72. More examples
S.n. Infix Notation Prefix Notation Postfix Notation
1 a + b
2 (a + b) * c
3 a * (b + c)
4 a / b + c / d
5 (a + b) * (c + d)
6 ((a + b) * c) - d
73. More examples
S.n. Infix Notation Prefix Notation Postfix Notation
1 a + b + a b a b +
2 (a + b) * c * + a b c a b + c *
3 a * (b + c) * a + b c a b c + *
4 a / b + c / d + / a b / c d a b / c d / +
5 (a + b) * (c + d) * + a b + c d a b + c d + *
6 ((a + b) * c) - d - * + a b c d a b + c * d -
74. Deque
⚫ a double-ended queue (dequeue, often abbreviated
to deque, pronounced deck) is an abstract data type
that generalizes a queue, for which elements can be
added to or removed from either the front (head) or
back (tail).
⚫ It is also often called a head-tail linked list, though
properly this refers to a specific data structure
implementation
75. Deque
⚫ Double-Ended Queue = stack + queue hybrid, supports
adding and removing elements at the front and at the end.
⚫ Implemented using a circular queue
? P Q R ?
FRONT
REAR
77. Operations
Operation C
insert element at back push_rear
insert element at front push_front
remove last element pop_rear
remove first element pop_front
81. Applications of Deque
⚫ Undo and Redo Operations
⚫ Forward and backward in browser
⚫ Palindrome checking
⚫ Scheduling in processor A steal job scheduling algorithm
⚫ Manufacturing multiple items in industry
⚫ Multiprocessing
82. Palindrome checker
R A D A R
PUSH FRONT
R A D A R
POP FRONT POP REAR
If value on POP FRONT == value on POP REAR
Then true
Else
False
If front == rear
Then return
83.
84. Explanation
⚫ One example where a deque can be used is the A-Steal job scheduling
algorithm. This algorithm implements task scheduling for several processors.
A separate deque with threads to be executed is maintained for each
processor. To execute the next thread, the processor gets the first element
from the deque (using the "remove first element" deque operation). If the
current thread forks, it is put back to the front of the deque ("insert element
at front") and a new thread is executed. When one of the processors finishes
execution of its own threads (i.e. its deque is empty), it can "steal" a thread
from another processor: it gets the last element from the deque of another
processor ("remove last element") and executes it. The steal-job scheduling
algorithm is used by Intel's Threading Building Blocks (TBB) library for
parallel programming.
85. Priority Queue
A priority queue stores a collection of entries
Each entry is a pair of (key, value)
Keys in a priority queue can be arbitrary objects
on which an order is defined
Two distinct entries in a priority queue can have
the same key
1 2 3 4 5
20 10 40 30 50
KEY
VALUE
FRONT REAR
86. Priority Queue
Main methods of the Priority Queue ADT
insert(k, x)
inserts an entry with key k and value x
removeMin()
removes and returns the entry with smallest key
Additional methods
min()
returns, but does not remove, an entry with
smallest key
size(), isEmpty()
87. Priority Queue
Applications:
Shortest job first scheduling
Stand by flyers
Auctions
Stock market
Bandwidth management
Dijkstra's algorithm
Huffman coding
Best-first search algorithms
Prim's algorithm for minimum spanning tree
89. Tutorial
Write the short note on
Data structure and Algorithm including definition, analysis
and example
Time and space complexity explain with example
Circular queue with diagram and array representation
Priority queue
90. Quiz Question
Harry battels with Voldemort
Voldemort has a big army, so he has maintained his
people in a queue of size N to fight Harry's army.
The queue contains the fighters with different power
and they are called in the first in first out order.
Harry maintains a stack of fighters and calls them when
his previous fighter is down.
The stack contains fighters with different power and
they are called in last in first out order.
When ever a fighter from Voldemort army strike the
harry’s fighter will fight against it
91. Quiz Question
Harry battels with Voldemort
The value at top of the stack denotes the power of the
fighter of harry’s army
The value at the front of the queue denotes the power of
the fighter of Voldemort’s army
The duel has three results if power of harry’s fighter is
greater than the power of Voldemort’s fighter then 1
point for harry otherwise 1 point for Voldemort, if they
have equal power the fight will be a draw and both will
not get any point.
As they are busy fighting, can you help Dumbledore to
keep the record who wins the battel