ALGORITHM 4
DATA STRUCTURES AND ALGORITHM
Student’s Name
Course
Professor’s Name
University
City (State)
Date
Sequential Data Structures and Algorithm
Data structure refers to programmatic means of storing data to allow efficient usage and retrieval. After this, the user can decide on how to modify and access data (Mehlhorn, 2013). Conversely, an algorithm can be defined as a step-to-step procedure comprising of a set of logic and instructions written to be executed in a specific order to realize the desired output. In a data structure, applications become more complex creating various problems such as multiple requests, processor speed, and data search.
Processor speed is the number of cycles in every second where a computer central processing unit operates and processes the data. In designing a data structure, if the central processing unit of a computer has more cycles to complete in a second, the faster the information can be access. In spite of high processor speed, it can fall limited when the data expands to billion records.
Data search is a technique that aids in finding the places of value in the list. For instance, if an inventory has 1 million items in a store and the application is used in the search for an item, it will have to search 1 million items each time while the search slows down (Mehlhorn, 2013). If the data increases, the search will automatically be slow.
Multiple requests occur when thousands of users search for data on a web server simultaneous despite the server failure while conducting the servers. Thus, it is for these challenges that a data structure comes to resolve. In this context, a data structure allows data to be organized in a way that every item does not need to be searched. With data structure, data can be searched instantly.
Ideally, an algorithm is created independently with a specific language. All algorithms should satisfy properties such as finiteness, definiteness, output, and input, and correctness. Definiteness implies that all steps of an algorithm have to be well-defined and precise. In designing an algorithm, the following categories must be captured, namely delete, update, insert, sort, and search (Goodrich et al, 2014). A computer algorithm can be applied to solve the problem such as computing the range of a set of real numbers or calculating the products of two integers or variable
A data structure can be used to execute time in a relative way such as the best case, the average case, and the worst case. A best-case refers to a scenario depicting the minimal likelihood time of execution of a data structure operation. For instance, if the time to be taken by an operation f(x) in execution, the operation actual time may assume a random number f(x) that is maximum (Mehlhorn, 2013). The average case is a scenario of portraying the average execution time of a data structure operation. Also, a worst-case refers to a situation where a specific operation of data structures take the maximum possible time it ought to take.
Primitive data structures entail Char, Boolean, Float, and integers, among others. However, data can be stored in connected and extensive data called abstract data structure such as queue, graph, tree, and linked list. Both abstract data structure and primitive data structure are designed to allow users to perform various operations on data (Goodrich et al, 2014). Ideally, an algorithm is assumed to be faster when it not only consumes fewer memory spaces but also takes less time to execute. Thus, algorithm performance is measured based on space complexity and time complexity. Every algorithm needs space to capture components such as environment space, data space, and instruction space.
Reference List
Mehlhorn, K., 2013. Data structures and algorithms 1: Sorting and searching (Vol. 1). Springer Science & Business Media.
Goodrich, M.T., Tamassia, R. and Goldwasser, M.H., 2014. Data structures and algorithms in Java. John Wiley & Sons.