1.B 2.B 3.C 4.B 5.B 6.C 7.A 8.A 9.C 10.A
Answer:
-44.92
Explanation:
If he has no money hell be in the hole
Is it solar heat? ultraviolet heat? UV?
Answer:
C++.
Explanation:
#include <iostream>
#include <string>
using namespace std;
////////////////////////////////////////////////////////////////////////////
int sumDigits(string alphanumeric) {
if (alphanumeric.length() == 1) {
if ((int(alphanumeric[0]) >= 48) && (int(alphanumeric[0]) <= 57)) {
cout<<int(alphanumeric[0]) - 48<<endl;
return (int(alphanumeric[0]) - 48);
}
else
return 0;
}
else {
if ((int(alphanumeric[0]) >= 48) && (int(alphanumeric[0]) <= 57)) {
cout<<int(alphanumeric[0]) - 48<<endl;
return int(alphanumeric[0]) - 48 + sumDigits(alphanumeric.substr(1, alphanumeric.length()-1));
}
else
return 0 + sumDigits(alphanumeric.substr(1, alphanumeric.length()-1));
}
}
////////////////////////////////////////////////////////////////////////////
int main() {
cout<<"Sum: "<<sumDigits("ab1c2d3e54");
return 0;
}
Answer:
Using Merge Sort.
Explanation:
Merge Sort is preferred for sorting the linked list because the the data stored in linked list is not in serial memory address which makes the quick sort algorithm very slow and other sorting algorithms impossible.
Merge Sort is a divide and conquer algorithm.
In this algorithms we divide the linked list into sub parts and sort the sub parts of the linked list and then we merge them in sorted order. It is a very effective approach for linked list sorting.
The time complexity of merge sort is O(NLogN).