Reference no: EM131308477
Set: Sorting, Searching and Hashing
Overview:
Questions 1(b) and 2(a) of this assignment require a C++ compiler. As usual, you must submit the actual source code files (ending in .cpp) so that I can compile and run your programs, and your programs must compile. The remaining problems must be written up in a Microsoft Word document. A Power Point file or a scanned handwritten diagram is also fine for Problem 1(a). Remember to include your name and course number within all of the files and documents that you submit.
Sorting
Read the assigned chapter and the notes for Week 7 located in the Learning Activities area, and then do the following problems:
Download the QuickSort.zip file and modify the QuickSort.cpp file by implementing the functions for the Quick Sort Algorithm. When finished your function will sort the list of strings in alphabetical order. The quickSort() function will call the partition() function, and the partition() function will call the swapItem() function. Your program must use these functions.
Searching and Hashing
Read the assigned chapter and notes for Week 8 located in the Learning Activities area, and then do the following problems:
Download the SequentialSearch.zip file, then implement the details for the sequentialSearch() function so that it uses recursion. The following is the non-recursive iterative version of the function. The modified version of the function must implemented using recursion. The function prototype, the function signature, and everything else within the program will remain the same.
int sequentialSearch(string list[], int itemIndex, int lengthOfList,
string item)
{
for (itemIndex=0; itemIndex < lengthOfList; itemIndex++)
{
if (list[itemIndex] == item)
{
return index;
}
}
return -1;
}
Briefly describe what double hashing is and describe what problem double hashing helps to resolve. Also, provide an example of a rule that can be used for a double hashing probe sequence.
Other Notes: Submit your solutions as a single Zip file using the Problem Set 4 link provided in the Assignment area. Again, if you are using Visual C++ or Dev-C++, please do not submit the entire source code project. You only need to submit the individual source code file. As usual, please ask if you have questions in either the Ask the Instructor forums area or via e-mail.
Publicly traded and has coupon rate and yield to maturity
: Andrew-win Ltd has a debt-to-equity ratio of 0.4. Andrew-win Ltd’s debt is publicly traded and has a coupon rate and yield to maturity of 7% and 9%,respectively. It has a firm’s beta of 1.3. The risk-free rate is 5% and the expected return on the..
|
When efficiency is important in business environment
: Please describe when efficiency is important in a business environment, and give an example of when effectiveness is more important than efficiency. Make sure your two examples include an aspect of information technology.
|
Collaborate in developing a project schedule
: Adding the Time Dimension, as well as your own insights and experience, discuss at least five benefits a project team is likely to gain if members collaborate in developing a project schedule. Cite examples not presented in this chapter.
|
Show the application of cookies in a web portal
: In HTTP, draw a figure to show the application of cookies in a scenario in which the server uses cookies for advertisement. Use only three sites.
|
Describe what problem double hashing helps to resolve
: Briefly describe what double hashing is and describe what problem double hashing helps to resolve. Also, provide an example of a rule that can be used for a double hashing probe sequence.
|
Net present value and internal rate of return
: Western Beef Exporters is considering a project that has an NPV of $32,600, an IRR of 15.1 percent, and a payback period of 3.2 years. The required return is 14.5 percent and the required payback period is 3.0 years. Which one of the following statem..
|
Potential discriminatory practices
: Question: How could a human resource management (HRM) department use these tests to determine potential discriminatory practices?
|
Does http have any session-layer features
: In Chapter 1, we mentioned that the TCP/IP suite, unlike the OSI model, has no session layer. But an application-layer protocol can include some of the features defined in this layer if needed. Does HTTP have any session-layer features?
|