1. Please describe the relationship between Data, Primitive Data Types, and Data
ID: 3729728 • Letter: 1
Question
1. Please describe the relationship between Data, Primitive Data Types, and Data Structures in programming.
2. Explain the “trade offs or decisions” required when writing/creating applications. Reference the choice between Native Mobile, Native Desktop, and Web applications. How do the “decisions” relate to Data Structures and algorithms implemented in the app creation process?
3.Describe divide and conquer algorithms in your own words. Explain how the Binary Search works and what are the requirements for data to implement an effective Binary Search.
Explanation / Answer
1)
Data is a set of values. Data is defined as information that has been transalated into a form that supports efficient processing.
Eg: Student Name, Employee salary
Data type is a set of data values having predefined characteristics. The range of values that can be stored in these data types is defined by the language and the computer hardware.
Eg: Character, Integer, Floating point etc
Data types are used to specify the the type of data contained in variables.
Data structures is a collection of simple data types and a set of rules for organizing and accessing the collection
Eg: Array, Stack, Queue
2)
When writing/creating applications the trade off decisions required are time complexity and space complexity.
Time complexity is a function describing the amount of time an application takes in terms of the amount of input to the application.
Space complexity is a function describing the amount of memory (space) an application takes in terms of the amount of input to the application.
3)
The divide-and-conquer, breaks a problem into subproblems that are similar to the original problem, recursively solves the subproblems, and finally combines the solutions to the subproblems to solve the original problem.
It consists of 3 parts.
Binary Search
Binary Search is used to search a key element in a sorted array by repeatedly dividing the array in half.
To implement effective binary search we require the input to be a sorted array.
Divide and conquer method for implementing binary search is described below
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.