Answer:
Explanation:
Algorithm:
a. In each day, you will have to loop through the hotels that come to the hotel after you stayed last night.
b. If a hotel 'h' is found at more than 'd' distance away from last stayed hotel, then the hotel previous of 'h' is chosen to wait for that night. This is the greedy step, and you stay in this hotel.
c. The process for steps a and b is then repeated until we've reached the last hotel xn.
Running time:
Notice that the worst case occurs if each hotel is at a distance of successive multiples of 'd'. The best move is to estimate the distance to each hotel twice the whole computation in the scenario.
Thus, the total running time that could occur in the worst case is O(2n) = O(n). This is said to be linear time.
Answer:
Infrastructure as a service(Iaas)
Explanation:
Infrastructure as a service(Iaas) is used to provide hardware,storage,servers and datacenter space or network components
Answer:
c. short-term
Explanation:
According to a different source, these are the options that come with this question:
a. long-term
b. implicit
c. short-term
d. explicit
This best illustrates the limited capacity of short-term memory. Short-term memory is the most recent information that a person holds in his head. Usually, this corresponds to events that occurred in the last 30 seconds to the last few days. This type of memory stores recent events, as well as sensory data such as sounds.
Answer:
a. True
b. False
Explanation:
Constructor is used to initialize the object of the class.
Rules of constructor:
1. Constructor name must same as the class name. it means, if the class name is animalType, then constructor name must be animalType.
2. Constructor does not have any return type. it means, it does not return anythings.
Therefore, part (a) is true, Constructor name must same as the class name.
and part (b) is false, because constructor does not have any return type.