Find Jobs
Hire Freelancers

Write some Software

£10-20 GBP

Completed
Posted over 7 years ago

£10-20 GBP

Paid on delivery
4 questions need completed ASAP, in JAVA with error checking and comments. Write a program that takes input of integers N and M (separated by space) on first line, followed by an array of N integers on second line (separated by space) and then M more lines, each with an integer. For each of the of those ​*M*​ integers, output "True" (without quotes), if that number is present in the array N. Output "False" (without quotes) otherwise. Constraints: 0 < N < 20,000 0 < M < 15,000 Your output lines should not have any trailing or leading whitespaces Input: 4 2 99 12 10 23 23 25 Output: True False Explanation: An array of size 4 is taken, followed by 2 lines. 23 outputs True, since 23 is present in above array. 25 outputs False because it was not in the array of N numbers. 2. Write a program that takes input of an integer N, followed by N more integers. The program should calculate the median of the set of N numbers. If N is even, median is N/2 th number. Input#1: 5 1 8 22 13 4 Output#1: 8 Input#2: 4 9 1 10 11 Output#2: 9 3. Write a program that takes input of an integer N, followed by N lines of input sentences. For each sentence, reverse each word in each sentence. The order of words are not reversed. Note: Your output lines should not have any trailing or leading whitespaces. 0 < Max Number of Inputs <= 100 0 < Number of Words in one input < 100 0 < Length of Word In A Sentence < 20 Example: Input: 3 RemoteIo is awesome Candidates give interview best candidates are selected Output: oIetomeR si emosewa setadidnaC evig weivretni tseb setadidnac era detceles 4. You've built an in-flight entertainment system with on-demand movie streaming. Users on longer flights like to start a second movie right when their first one ends, but they complain that the plane usually lands before they can see the ending. So you're building a feature for choosing two movies that will best fit the flight length. Write a program that takes an input of an integer on the first line representing the flight length, followed by an array of integers on the second line (separated by space), each representing a different film's duration in minutes, and returns the best two movie durations that will fill the most of the flight time, or false if no movies match. When building your function: Assume your users will watch no more than two movies Don't make your users watch the same movie twice Optimize for runtime over memory Input: 90 25 60 10 20 80 Output: 10 80 Explanation: of the movies available, the 3rd and 5th will be the best fit for the flight, in that they will fill the most of the duration.
Project ID: 11847870

About the project

6 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
£13 GBP in 3 days
0.0 (0 reviews)
0.0
0.0
6 freelancers are bidding on average £59 GBP for this job
User Avatar
Hi sir, I have read the four programs and will complete within 4 hours. ready to start now. thanks.....
£55 GBP in 1 day
5.0 (197 reviews)
5.8
5.8
User Avatar
hi mate this is Asad, i have a vast experience in java programming, need an A grade? contact me. cheers :)
£50 GBP in 1 day
4.9 (30 reviews)
5.7
5.7
User Avatar
Hi there! I'm a professional Software Developer, and I'm ready to implement those programs. Price i updated because this is the reasonable price. Thanks Best, Maher
£50 GBP in 1 day
4.9 (39 reviews)
5.1
5.1

About the client

Flag of MEXICO
Ballynahinch, Mexico
4.2
1
Payment method verified
Member since Oct 20, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.