1. (10 points) The syntax for for loops (usually) describe how many times statements in its scope executes. An analysis
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
1. (10 points) The syntax for for loops (usually) describe how many times statements in its scope executes. An analysis
1. (10 points) The syntax for for loops (usually) describe how many times statements in its scope executes. An analysis skill is to be able to use summation notation to count the number of times instructions executes in a for loop. Here is an example from linear algebra: Given two vectors Ả = = (a₁, a2,..., an) andB = (b₁,b₂,..., bn) Their inner (some call it a dot) product is k=n (a/b) = Σak bk k=1 Write this sum as a for loop and state its big-O time complexity.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!