Answer:
Stack
Explanation:
Any function that call itself can be regarded as recursive function, it should be noted that Recursion is a natural use for a stack, especially in the area of book keeping.
Recursion is very important because some of problems are usually recursive in nature such as Graph and others, and when dealing with recursion , only base and recursive case is needed to be defined.
Some areas where recursion is used are in sorting and searching.
That statement is true.
Ladders commonly used to do a couple of construction activities in a higher region of a building or area.
If this equipment is not used properly, it could potentially caused fatal accidents for the people on the site
Answer: Hello your question is poorly written attached below is the well written question
answer:
a) Determine ( compute ) the difference between the max and minimum value. determine the Min and max values using 1.5n comparisons
time efficiency = θ( n )
b) A(n-1) - A(0)
time efficiency = θ( 1 )
Explanation:
a) An unsorted array
To find the maximum and minimum values scan the array of elements , then determine ( compute ) the difference between the max and minimum value. to determine the range. Alternatively determine the Min and max values using 1.5n comparisons
Algorithm's time efficiency = θ( n )
b) A sorted array
To determine the range, we will determine the difference between the first and last element i.e. A(n-1) - A(0)
time efficiency = θ( 1 )
Answer:
String word = "George slew the dragon";
int pos = word.indexOf("dr");
String drWord = word.substring(pos, pos+4);
System.out.println(drWord);
Explanation:
Assuming dr is always there, we don't have to check the validity of 'pos'. Normally, you would!
Answer:
Yes It's true but You forgot email
Explanation: