Answer: True
Explanation: The potential error in Word is defined as the error that arises when it tries to post some content or text but the user is not sure whether it is posted or not.In Word, the error is relate top the spellings, phrase,grammar etc, in which the Word tries to give alternatives to the particular word or text.
The error is marked with the underline that can be red which means the spelling is incorrect ,green shows some grammatical error and blue is for the inconsistency in the format. Thus, the given statement is true.
Answer:
True: In binary search algorithm, we follow the below steps sequentially:
Input: A sorted array B[1,2,...n] of n items and one item x to be searched.
Output: The index of x in B if exists in B, 0 otherwise.
- low=1
- high=n
- while( low < high )
- { mid=low + (high-low)/2
- if( B[mid]==x)
- {
- return(mid) //returns mid as the index of x
- }
- else
- {
- if( B[mid] < x) //takes only right half of the array
- {
- low=mid+1
- }
- else // takes only the left half of the array
- {
- high=mid-1
- }
- }
- }
- return( 0 )
Explanation:
For each iteration the line number 11 or line number 15 will be executed.
Both lines, cut the array size to half of it and takes as the input for next iteration.
Answer:
dominoes, fans, PVC pipe, magnets, duct tape, marbles, cups or bowls, miniature toy cars, paper towel tubes, string.
------------------------------------------------------------------------------------------------------------
dominó, abanicos, tubos de PVC, imanes, cinta adhesiva, canicas, tazas o cuencos, carros de juguete en miniatura, tubos de toallas de papel, cuerdas.
Explanation:
when using a dark background for presentations you should use bright colors to contrast with it
this makes the informations much easier to see and read for example white text on black background
Answer:
public static String repeat(String text, int repeatCount) {
if(repeatCount < 0) {
throw new IllegalArgumentException("repeat count should be either 0 or a positive value");
}
if(repeatCount == 0) {
return "";
} else {
return text + repeat(text, repeatCount-1);
}
}
Explanation:
Here repeatCount is an int value.
at first we will check if repeatCount is non negative number and if it is code will throw exception.
If the value is 0 then we will return ""
If the value is >0 then recursive function is called again untill the repeatCount value is 0.