<< Prev Showing: 326-330 of 353 Next >>
· 301-305 · 306-310 · 311-315 · 316-320 · 321-325 · 326-330 · 331-335 · 336-340 · 341-345 · 346-350 · 351-353 ·C++ reverse integer using recursion
I need a recursive function that accepts an integer and returns its reverse. for example int reverse( int n ); int main() { int n; n = reverse (123) ; // this returns 321 } I can do this easily without recursion but I have to use recursion. Thank you.
Subject:
Computer Science
Topic:
Data Structures and Algorithms
Posting ID:
181080
OTA ID:
105277
The free newString() takes string objects strA and strB as arguments. For its action, newString() compares the string by using < and returns the concatenation of the arguments, with the lesser sring coming first. a) give a function prototype for newString() b)Give the implementation for newString() c) The main program has the following string declarations, which should be used for parts (i) and (ii) sring A = "String", B = "cat"; i) cout<< newString(A,B) //Output:_________ ii) cout<< newString(A,"C++"); // Output: _______
Subject:
Computer Science
Topic:
Data Structures and Algorithms
Posting ID:
181579
OTA ID:
101298
Write a program that generates an array of 10 random integers in the range from 0 to 999. Output array using the template function writeArray(), and then call the function bubbleSort() to sort the list. Output the sorted list.
Subject:
Computer Science
Topic:
Data Structures and Algorithms
Posting ID:
181583
OTA ID:
101298
Software Algorithms and Implementation
Please see the attached file. Give the order of each of the following functions. TA(n) = 200(n +4)3 TB(n)= n4 + 300n3log2(n) TC(n)=(2n +3)2log3(n) Suppose that each is the time efficiency function of an implementation of the same function (TA(n) for implementation A, and so on). Which of the implementations (A, B or C) will be the most efficient for very large values of n? Please explain.
Subject:
Computer Science
Topic:
Data Structures and Algorithms
Posting ID:
182048
OTA ID:
101298
Give the value of v.size() after executing each of the following statements: (Be sure to include the code used to execute the statements. One program will be fine to execute all statements, no need to write multiple programs.)
vector
Subject:
Computer Science
Topic:
Data Structures and Algorithms
Posting ID:
182693
OTA ID:
101298
<< Prev Showing: 326-330 of 353 Next >>
· 1-5 · 6-10 · 11-15 · 16-20 · 21-25 · 26-30 · 31-35 · 36-40 · 41-45 · 46-50 · 51-55 · 56-60 · 61-65 · 66-70 · 71-75 · 76-80 · 81-85 · 86-90 · 91-95 · 96-100 · 101-105 · 106-110 · 111-115 · 116-120 · 121-125 · 126-130 · 131-135 · 136-140 · 141-145 · 146-150 · 151-155 · 156-160 · 161-165 · 166-170 · 171-175 · 176-180 · 181-185 · 186-190 · 191-195 · 196-200 · 201-205 · 206-210 · 211-215 · 216-220 · 221-225 · 226-230 · 231-235 · 236-240 · 241-245 · 246-250 · 251-255 · 256-260 · 261-265 · 266-270 · 271-275 · 276-280 · 281-285 · 286-290 · 291-295 · 296-300 · 301-305 · 306-310 · 311-315 · 316-320 · 321-325 · 326-330 · 331-335 · 336-340 · 341-345 · 346-350 · 351-353 ·Page generated in 0.0958 seconds