Questions: 856

Answers by our Experts: 763

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Design an algorithm and the corresponding flowchart for finding the sum of




the numbers 2, 4, 6, 8, …, n

How to convert task 1 bob builder assignment to javascript

A new feature is to be implemented in Kindle. FEATURE : The user inputs the no. of days in which he would like to complete a particular book and the Kindle will create a reading plan for the user.



Write an algorithm which will output the reading plan to the user. The reading plan should be created keeping in mind that the user would like to begin and end reading a particular “chapter” of the book on the same day.


Write an algorithm to check whether a given number is an Armstrong number. An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 33 +73 + 13 = 371


Write an algorithm which multiplies two numbers using the minimum number of additions.


You are given an array X of floating-point numbers x1, x2, … xn. These can be rounded up or down to create a corresponding array Y of integers y1, y2, … yn



Write an algorithm that finds an appropriate Y array with the following properties:



• The rounded sums of both arrays should be equal.


• The absolute pairwise difference between elements is minimized. In other words, |x1- y1| + |x2- y2| + ... + |xn- yn| should be as small as possible.



For example, suppose your input is [1.3, 2.3, 4.4]. In this case you cannot do better than [1, 2, 5], which has an absolute difference of |1.3 - 1| + |2.3 - 2| + |4.4 - 5| = 1.



You have a stream of data coming in of size n, but you don’t know what n is ahead of time. Can you write an algorithm that will take a random sample of k elements?


You are given two array of “n” length. First array contains the starting time of meetings. Second array contains the ending time of those meetings. Write an algorithm that detects meeting conflicts.


You are provided a set of positive integers (an array of integers). Each integer represents a number of nights users request on Airbnb.com. If you are a host, you need to design and implement an algorithm to find out the maximum number of nights you can accommodate. The constraint is that you have to reserve at least one day between each request, so that you have time to clean the room.


Input: [1, 2, 3]; output: 4, because you will pick 1 and 3

Input: [5, 1, 2, 6]; output: 11, because you will pick 5 and 6

Input: [5, 1, 2, 6, 20, 2]; output: 27, because you will pick 5, 2, 20


Given the set 1 3 5 7 7 3 2 5 9 7 of unknown length, write an algorithm that figures out which occurs most frequently and with the most continuous repetition.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS