Programming assignment - hash implementation

Assignment Help JAVA Programming
Reference no: EM131601365

Programming assignment: program in java.

2-Sum problem:

Given an unsorted array of integers A = {2, 13, 8, 38, 63, 9, 11, 4, 1, 3}
and a target sum Sum = 17

Goal: Using a hash implementation, determine if there exists two integers x, y in A such that x + y = Sum

Assume that there is only one solution to the sum.

If such integers are found, your solution should output the Sum and the two integers x and y. If not found, your solution should output
the string "Target sum not found" concatenated with the target sum.

Reference no: EM131601365

Questions Cloud

Discuss an idiographic profile and a nomothetic profile : What is the difference between an idiographic profile and a nomothetic profile. Why should a profile contain elements of both
Create a project charter and identify the key constraints : Create a project charter and identify the key constraints of the project (scope, budget, timeline, quality, people resources, etc.).
Discuss what police officers and crime scene technicians : discuss what police officers and crime scene technicians should know about DNA and whether either group has more responsibilities
Create a schedule that identifies the deliverables : Create a schedule that identifies the deliverables, activities, and resources to produce this mailing. Identify the resources you will use.
Programming assignment - hash implementation : Using a hash implementation, determine if there exists two integers x, y in A such that x + y = Sum - your solution should output the Sum
Discuss the function of homeland security : The Department of Homeland Security, or is this function shared among other governmental and nongovernmental agencies
Discuss the efficacy in professionalizing sport coaching : Write a paper to discuss the efficacy in professionalizing sport coaching as a career in Singapore. the various learning channels for sport coaches.
Create a class that represents a toaster : Create a class that represents a Toaster - Put the bread in the toaster - Turns off automatically
Discuss game plan prior to the shift in terrorist thinking : What does the author mean when he spoke of a game plan prior to the shift in terrorist thinking

Reviews

Write a Review

JAVA Programming Questions & Answers

  Initialize the array with the appropriate number of values

Initialize the array with the appropriate number of values. What is the value in the array element when the index contains 2? What is your list length

  Make a row with different string names

How do you make a row with different string names and put a certain amount of space between each one?

  Computes the raise and new salary for an employee

Computes the raise and new salary for an employee. Complete the following program to determine the raise and new salary for an employee by adding if ... else statements to compute the raise

  The class date was designed and implemented

In Programming Exercise 2, the class Date was designed and implemented to keep track of a date, but it has very limited operations. Redefine the class date so that, it addition to the operations already defined, it can perform the following operation..

  What secret does soraya tell amir

What secret does soraya tell amir and how does amir react to this information

  Write a program that reads a file name from the keyboard

Write a program that reads a file name from the keyboard. The file contains integers, each on a separate line. The first line of the input file will contain the number of integers in the file. You then create a corresponding array and fill the array ..

  Write java program which will permit user to make selection

Write the Java Program which will permit the user to make selection. You will present user with two options to perform, then you will perform action selected by user.

  Write a java program to list odd numbers

Q1:Scenario: Write a Java program to list Odd numbers between 1 to any user given input number.Typical run of the program

  In this project you will simulate some people catching fish

in this project you will simulate some people catching fish in a lake. the purpose of the assignment is to get used to

  Vector equation of the intersection

Find the vector equation of the intersection of the surface F(x,y)= x+(pi/2)y^2+tan(xy) and the plane x=(pi/3) . let y=t.

  What order would the integers be visited

Show the contents of the array after each swap step of a selection sort - what order would the integers be visited?

  Create the class airplane

Your missions is to create the class Airplane. Each Airplane object should store the following information (fields):

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd