I have upload the lab for you
lab_2___part_i.docx
lab_2___part_ii.docx
Unformatted Attachment Preview
Lab 2 Part II
Problem 1: (50 points)
You are given the following source code to search for a number in an array
#include
using namespace std;
int search(int sa, int list[ ], int size)
{
bool notFound = true;
int position = -1;
int k = 0;
while (k” for C++ strings.
Example:
Original List: Paris, Washington DC, London, Tokyo, Madrid, Rio di Janeiro, Brussels, Ankara,
Rome, Amsterdam
After applying the Lexicographical order, the list will be become:
Resulting List: Amsterdam, Ankara, Brussels, London, Madrid, Paris, Rio di Janeiro, Rome,
Tokyo, Washington DC
If the first letters of the two cities are the same, you should compare the next ones.
Original List: Ankara, Amsterdam
Resulting List: Amsterdam, Ankara
…
Purchase answer to see full
attachment

