ALGORITHMS UNIT TEST ACTUAL QUESTIONS AND ANSWERS WITH COMPLETE SOLUTION
ALGORITHMS UNIT TEST ACTUAL QUESTIONS AND ANSWERS WITH COMPLETE SOLUTION Which of these best describes which algorithms are more efficient with parallel computing An algorithm that benefits from parallel computing is one that can be broken down into smaller independent operations A software engineer at a mapping company is asked to write a geocoding program that can convert 6000,000 addresses into latitude/longitude pairs. The geocoding needs to be completed by the next day, in time for a company deadline When the engineer tries running the program on their computer, they realize that their computer cannot complete the fast quickly enough. They decide to use distributed computing to improve the performance A distribution computing solution can geocode multiple addresses at once by using multiple computers The two algorithms below are both intended to calculate the sum of cubes from 1 to n, where n is any positive integer. For example, if n is 3, the algorithms should calculate a sum of 36, from 1^3 + 2^3 + 3^3. Both algorithms calculate the correct sum. TensorFlow is an open-source machine learning platform with support for distributed computing. This chart shows the speedup gained from using TensorFlow to train a neural network with an increasing number of computers: Distributed computing can reduce the time it takes to solve large problems. An app for electric car owners includes a feature that shows them the charging station that's the nearest to them. To calculate that, the app first finds the 10 closest stations according to their beeline distance from the user address. It then uses the procedure below to calculate the driving distance to each station and returns the station with the shortest distance. The call to calcDrivingDistance() takes 3 seconds to return a result, as the driving directions algorithm requires searching through many possible routes to calculate the optimal route. The other operations, like incrementing the index and comparing the distances, take only a few nanoseconds. 30 seconds The following algorithm displays a sequence of 10 odd squares: Start by setting n to 1. Repeat 10 times: Multiply n by itself and display the result Add 2 to n n ← 1 REPEAT 10 TIMES { result ← n * n DISPLAY(result)
Written for
- Institution
- Khan
- Course
- Khan
Document information
- Uploaded on
- May 3, 2024
- Number of pages
- 10
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
algorithms unit test actual questions and answers