[solved] – Question 73552

Two pairs of integers (a, b) and (c, d) are said to be symmetric if b = c and a = d. For example, given an array of pairs { {31, 57}, {80, 90}, {25, 70}, {90, 80}, {70, 25}, {11, 20}, {10, 5}, {30, 40} }, the symmetric pairs are:
{80, 90} and {90, 80}
{25, 70} and {70, 25}

Design a hash table-based algorithm of time complexity ϴ(n) to identify the symmetric pairs in an array of ‘n’ pairs.
Show the working of your algorithm for the above array of pairs with a hash function H(K) = K mod 7.

What would this be

Expert Answer


[solved] – Question 73553

Consider the following two variants of the pseudo code for the Insertion Sort algorithm. Using each variant, sort the array: 51 52 53 54 55. Note that 51, 52, …, 55 are five different instants of integer 5 and need to be treated as separate elements (that are of the same numerical value). Determine the number of comparisons encountered with each of the two variants of the algorithm to sort the above array and what is the final sorted array (include the suffixes of the elements throughout your work).

Pseudo Code – IPseudo Code – II

Expert Answer


[solved] – Question 73560

. Consider an array of prime integers in the range [1…20] with the entries randomly distributed. Find the average number of comparisons for a sequential search in the array.

Expert Answer


[solved] – Question 73570

Create a Python program with two functions, FunctionA(str1,str2) and FunctionB(str3).

Expert Answer


[solved] – Question 73611

EXPLAIN THE PROCESS OF TOKEN PASSING IN A RING TOPOLOGY. HOW IS DATA COLLISION AVOIDED IN THIS METHOD?

Expert Answer


[solved] – Question 73612

EXPLAIN THE LAYERS OF TCP/IP REFERENCE MODEL. COMPARE ITS ADVANTAGES AND DISADVANTAGES WITH RESPECT TO OSI MODEL

Expert Answer


[solved] – Question 73613

DISCUSS THE ADVANTAGES AND DEMERITS OF THE TECHNOLOGICAL ADVANCES IN THE COMMUNICATION TECHNOLOGY

Expert Answer


[solved] – Question 73614

COMPARE THE MERITS AND DEMERITS OF MACHINE LEVEL LANGUAGE AND ASSEMBLY LANGUAGE

Expert Answer


[solved] – Question 73617

Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and associates that value with total. Thus your code should associate 1*1 + 2*2 + 3*3 +… + 49*49 + 50*50 with total. Use no variables other than k and total.

Expert Answer


[solved] – Question 73639

You displayed:
Susan Meyers, employee number 47899 , works as a Sales Rep in Marketing.
Mark Jones, employee number 39119 , works as a Programmer in IT.
Joy Rogers, employee number 81774 , works as a Engineer in Manufacturing.

instead of:
Susan Meyers, employee number 47899, works as a Sales Rep in Marketing.
Mark Jones, employee number 39119, works as a Programmer in IT.
Joy Rogers, employee number 81774, works as a Engineer in Manufacturing.

This is the error that is giving me and i do not have a space in between

Employee first = new Employee(“Susan Meyers, employee number” ,47899, “, works as a Sales Rep”,”in Marketing.” );

after each comma java will display a space in between and i do not want it

Expert Answer