Answer:
function
increase_elements_by_x (list, x)
{
var tplist = [];
for (i = 0; i < list.length; i++)
{
tplist[i] = list[i] + x;
print (tplist[i])}
return tplist;
}
var list =[1, 3, 5];
var copyList;
var x = 3;
copyList = increase_elements_by_x (list, x);
print (copyList);
Explanation:
Create a list named list with initial data 1,3,5.
Create a function name increase_elements_by_x which takes list and number as argument.Create empty list tplist. Loop through list, for ever index add x to list[index] and save to an empty list tplist. After loop is exited return tplist.
create a variable copylist and set it to increase_elements_by_x. Value returned by increase_elements_by_x will be saved in copylist. print copy list to see content of copy list.
Answer: Interface methods, interface variables and interface markers.
Explanation:
Interface methods are public and abstract by default.
Interface variables can be declared public, static and final
Marker interfaces are simply empty interfaces without any methods.
Answer:
Both if-then and switch is the decision control structure that enables the program to execute a statement or block of codes
Explanation:
This decision control structure always checks for one or more condition and execute true statement “if the condition is true” otherwise it will execute false statement (if present). The “true statement” is compulsory.
In case of “if-then loop”, it executes the true block only if the Boolean expression is true. In a similar way in switch-case, the same happens and instead of else part there will be a “default” statement which is compulsory to be present and it will get executed.
Answer:
See in Explanation
Explanation:
All you know is that an
algorithm is eventually (a lot) faster than an
algorithm, but for any specific value of n, you can't say anything. Indeed, the asymptotic growth of the function doesn't depend on its value on
. This means that if
then for all
, the following function is also
:

So asymptotic notation is completely uninformative regarding the performance of algorithms on specific values of n.
You could say that functions such as
are artificial and never really occur in practice. This is not quite true (you can hard-code some auxiliary information for small n, for example), but even if you consider "natural" functions, asymptotic notation doesn't help you to determine anything other than asymptotic's: consider for example
against
(such examples definitely happen in practice, for example in fast matrix multiplication).
Answer:
Web based email is a service that allows to access and use electronic mail via web browser.
It allows clients to login into the email software running on a web server to compose, send and receive, delete mails basically.