Answer:
C. an example of open-source software.
Explanation:
open-source software is the type of software in which anyone can access, it can also be shared And modified by anyone simply because ita accessible to the public.
Hence and open source software's source code can be
inspected, enhanced and modified by anyone. A typical example is Linux.
Answer:
The internet is considered as Wide Area Network (WAN).
Options :
A.) s1 < s2
B.) s1 <= s2
C.) s1.compareTo(s2) == −1
D.) s2.compareTo(s1) < 0
E.) s1.compareTo(s2) < 0
Answer: E.) s1.compareTo(s2) < 0
Explanation: Lexicographical ordering simply means the arrangement of strings based on the how the alphabets or letters of the strings appear. It could also be explained as the dictionary ordering principle of words based on the arrangement of the alphabets. In making lexicographical comparison between strings, the compareTo () method may be employed using the format below.
If first string = s1 ; second string = s2
To compare s1 with s2, the format is ;
s1.compareTo(s2) ;
If s1 comes first, that is, before s2, the method returns a negative value, that is a value less than 0 '< 0', which is the case in the question above.
If s2 comes first, that is, before s1, the method returns a positive value, that is a value greater than 0 '> 0'.
If both are s1 and s2 are the same, the output will be 0.
Answer:
quicksort.cpp
void quickSort(int arr[], int left, int right) {
int i = left, j = right;
int tmp;
int pivot = arr[(left + right) / 2];
/* partition */
while (i <= j) {
while (arr[i] < pivot)
i++;
while (arr[j] > pivot)
j--;
if (i <= j) {
tmp = arr[i];
arr[i] = arr[j];
arr[j] = tmp;
i++;
j--;
}
};
/* recursion */
if (left < j)
quickSort(arr, left, j);
if (i < right)
quickSort(arr, i, right);
}