Describe an algorithm you could use that would produce the


Section 1: Logic and Algorithms

Question 1:
Given an alphabetically sorted list of 500,000 people's names and telephone numbers, describe an algorithm that you could implement that would allow you to find a given person's telephone number in the shortest amount of time.

Question 2.
Given a list containing Province, CustomerName and SalesValue (sorted by Province and CustomerName), describe an algorithm you could use that would output each CustomerName and SalesValue with the total SalesValue per Province.

Question 3
You have been given a large list of people's names and have been asked to highlight all duplicates where the exact same name appears more than once, as well as highlight any possible duplicates where there may be misspellings of the same name. Describe an algorithm you could use that would produce the required output.

Question 4.
You are required to use a single integer value to store multiple values. Describe how you would achieve this.

Section 2: Programming

Question 1:
Given the table from Fig.1, write an SQL Select statement that would re-organize the results to look like Fig.2

Region

Contact

Cape Town

Fred

Cape Town

Joe

Cape Town

Anna

Durban

John

Durban

Mary

Johannesburg

Frank

Region

Contact

Durban

John

Durban

Mary

Johannesburg

Frank

Cape Town

Anna

Cape Town

Fred

Cape Town

Joe

Fig 2

Question 2:
Write a program in the language of your choice to input a sentence from the user and then output the sentence in reverse. For example, if the user types in "The Rain in Spain", then the output should be "Spain in Rain The".

Question 3:
If we list all the natural (integer) numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Write a program in the language of your choice to calculate the sum of all the multiples of 3 or 5 below 1000. Include the source code and the calculated value in your answer.

Question 4:

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.

Write a program in the language of your choice to output the 10001st prime number. Include the source code and the value in your answer.

Question 5:

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89,...

Write a program in the language of your choice to consider the terms in the Fibonacci sequence whose values do not exceed four million and find the sum of the even-valued terms. Include the source code and the calculated value in your answer.

Section 3: Database

This section evaluates your technical capabilities and allows us to determine your knowledge of the tools as well as your style.

Please use the below to tables for answering the questions in this section.

Table Name : Employee

ID Name Surname   Position
1 Scrooge McDuck Manager
2 Dairy Duck Manager
3 Donald Duck Support
4 Minny Mouse Support
5 Micky Mouse support
6 Goffy
Support
7 Pluto
Support
8 Huey Duck Support
9 Dewey Duck Support

Table Name: StaffLink

EmplID ManID
3 1
7 1
6 2
4 2
2 1
1 2
5 2

Question 1:

List which fields are primary keys and foreign keys?

Question 2:

Write a SQL statement that will Output the following result:

Question 3:
Write a SQL statement that will Output the following result:

Question 4

Write a SQL statement that will Output the following result:

Question 5:
Write a SQL statement that will Output the following result:

Section 4: Problem Solving Style

Question 1.

Why are computer monitors and TV sets rectangular?

Question 2.

You have written a program that takes several hours to run. The program sometimes fails, but usually only after a few hours of running and only when running on the production server. What steps would you take to identify the problem?

Question 3:
You have designed a system that accesses and updates a database. When you first install the
database and system at the customer, the system runs with good performance. However 3 months later, the Customer phones and says that it is taking a long time to search for information from the database. What would you do to diagnose and correct this problem?
nimmtion

Question 4:

You are working on a project for a very important customer and are at least three weeks from being able to complete the project. Suddenly your customer informs you that due to circumstances beyond their control the system must be implemented in one week. What would you do?

Question 5:

A drawer contains 10 black and 10 brown socks that are all mixed up. What is the fewest number of socks you can take from the drawer without looking and be sure to get 2 of the same colour.

Attachment:- standard test.pdf

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: Describe an algorithm you could use that would produce the
Reference No:- TGS01536170

Expected delivery within 24 Hours