subject

(a). A programmer at SoftTribe has declared a three-dimensional array BRUT in a programming language using BRUT[2:11, -4:9, 5:12] (i). Describe (without calculating) how he will:
(α). find the lengths of the three dimensions of BRUT
(β). find the number of elements in BRUT.
(ii). Give and explain a practical example in a university management system where a three-dimensional array could be used.
(b). People often use recursive algorithms. Discuss the difference between direct recursion and indirect
recursion. In which situations would a direct or indirect recursion be a better choice to use?
(c). Two Level 200 IT students, James and Morris, are discussing how to compare two algorithms for solving a given problem. James suggests that they should use the execution times of the algorithms as criterion; but Morris insists that they should use the
number of statements the algorithms execute as criterion.
(i). Explain the reasons why both criteria they are considering are not good for comparing algorithms.
(ii). Recommend an ideal solution/criterion that they should rather use for comparing algorithms.
Give a practical example to illustrate your answer.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Consider the following statements: #include #include class temporary { private: string description; double first; double second; public: temporary(string = "", double = 0.0, double = 0.0); void set(string, double, double); double manipulate(); void get(string& , double& , double& ); void setdescription(string); void setfirst(double); void setsecond(double); }; write the definition of the member function set() so that the instance variables are set according to the parameters. write the definition of the constructor so that it initializes the instance variables using the function set() write the definition of the member function manipulate() that returns a decimal number (double) as follows: if the value of description is "rectangle", it returns first * second if the value of description is "circle" it returns the area of a circle with radius first if the value of description is "cylinder" it returns the volume of a cylinder with radius first and height second. hint: the volume of a cylinder is simply the area of the circle at the base times the height. if the value of description is "sphere" it returns the volume of the sphere with radius first. otherwise it returns -1.0;
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
In deadlock avoidance using banker’s algorithm, what would be the consequence(s) of: (i) a process declaring its maximum need as maximum possible for each resource. in other words, if a resource a has 5 instances, then each process declares its maximum need as 5. (ii) a process declaring its minimum needs as maximum needs. for example, a process may need 2-5 instances of resource a. but it declares its maximum need as 2.
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Type the correct answer in the box. spell all words correctly. the managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
Lakendra finished working on her monthly report. in looking it over, she saw that it had large blocks of white space. what steps could lakendra take to reduce the amount of white space?
Answers: 3
You know the right answer?
(a). A programmer at SoftTribe has declared a three-dimensional array BRUT in a programming language...
Questions
Questions on the website: 13722363