Monday, June 17, 2019
Discussion questions 1-6 Assignment Example | Topics and Well Written Essays - 500 words
Discussion questions 1-6 - Assignment ExampleThey both involve finding the minimum or maximum in a set of unfamiliar real variables. A good example is how petroleum products be usually transported, that is transportation from production lay to the end user involves a wide range of modes of transport which include tank ships, rail tankers and pipelines. Each mode of transport here has disadvantages but argon nonetheless each used in the transportation of petroleum products from the source to the end user.I do agree with Dustin in that a vector is a collection of data of the aforementioned(prenominal) type. Vectors help in that the minimize repetition and coding if there is a wide range of data of the same type. Vectors are good I that they remove or add elements it access character elements by their location indices and they iterate elements through any order. Vectors perform almost the same way as arrays but similarly give room for expanding. However they take up more memory spac e than arrays. This is to al showtime for future growth.This is also true. A vector is indeed a compilation of data of the same type. However, vectors are also implemented as dynamic arrays meaning that their elements can also be accessed using offsets pointers to the elements. Generally, vectors are generally the fastest when it comes to adding, removing and accessing elements from the end sequence. However, in some situations they dont perform well. These situations include when removing and adding elements in otherwise positions other than the sequence endThis is true, an array should also be declared before being implemented. You should feed the compiler what type of array being defined. Arrays take up less space than vectors hence limiting their efficiency. However, arrays are best used when the data is minimal and when removing and adding elements that are not at the end of the sequence.This is true. Arrays are referred to low level abstraction because they cannot be defined and the code
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.