Find a sequence of neighbor numbers in an array

Assignment Help Basic Computer Science
Reference no: EM131341882

1. Write a program, which finds a subsequence of numbers with maximal sum. E.g.: {2, 3, -6, -1, 2, -1, 6, 4, -8, 8} à 11

2. Write a program, which finds the most frequently occurring element in an array. Example: {4, 1, 1, 4, 2, 3, 4, 4, 1, 2, 4, 9, 3} à 4 (5 times). 11. Write a program to find a sequence of neighbor numbers in an array, which has a sum of certain number S. Example: {4, 3, 1, 4, 2, 5, 8}, S=11 à {4, 2, 5}.

Reference no: EM131341882

Questions Cloud

Paying out a lot of dividends or repurchasing their stock : Please name two companies that have had positive earnings but a retained earnings deficit. Specifically looking for a company that is paying out a lot of dividends or repurchasing their stock. (Compared to Microsoft)
Creates an array containing all latin letters : Write a program, which creates an array containing all Latin letters. The user inputs a word from the console and as result the program prints to the console the indices of the letters from the word.
Negative retained earnings due to large dividend payous : Find a list of companies in similar size to Microsoft that have had negative retained earnings due to large dividend payous and/or stock repurchases (so not necssarily because they are doing bad as a company)
Provide an explanation of hashtables : Provide an explanation of hashtables, including a description of a realistic scenario that could be solved with the application of a hashtable. Then, compare the purpose and usage of hashtables to JTrees as well as one of the following additional ..
Find a sequence of neighbor numbers in an array : Write a program, which finds a subsequence of numbers with maximal sum. E.g.: {2, 3, -6, -1, 2, -1, 6, 4, -8, 8} à 11
Unforeseen problems with data security : In terms of securing data, what reasonable practices should consumers be able to expect when submitting personal information, such as credit card information, social security information, physical and e-mail addresses? How might P2P sites, such as..
Evaluate alternatives to the company self-hosting the site : Tony's Chips has recently been sold to a new independent company. The new company has hired you to manage a project that will move the old Website from an externally hosted solution to an internal one. The company's leadership is very concerned ab..
Learning about security policies and implantation : We have now spent several weeks learning about security policies and implantation. Discuss the importance of having security policies in place. Be sure to provide thorough, detailed and well supported answers.
Find those k consecutive elements in the array : Sorting an array means to arrange its elements in an increasing (or decreasing) order. Write a program, which sorts an array using the algorithm "selection sort".

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Object-oriented design to design a parent class called book

Use object-oriented design to design a parent class called Book that will receive the ISBN, author, title and price of a book, and select and print records for all books with a price of more than $50.00. Design a child class called TextBook th..

  More of the names on your list correspond

One or more of the names on your list correspond to the same IP address, but when you type those names into your web browser, you see different pages. Why would more than one name be assigned to a single address?

  Discuss some of the reasons why businesses

Wireless technology has been available for quite some time. Discuss some of the reasons why businesses have been slow to adopt this technology.

  Analysis of executive management team

Give a one to two page analysis summarizing the results to the executive management team of Omega.

  Design algorithms that search and maintain such linked list

Under this scheme the most frequently retrieved items eventually migrate to the front of the list. Design algorithms that search and maintain such a linked list.

  What is its numerical value on the big endian machine

If it is transmitted to a big-endian computer byte by byte and stored there, with byte 0 in byte 0, byte 1 in byte 1, and so forth, what is its numerical value on the big endian machine if read as a 32-bit integer?

  Regular expression and regular sets that is not solvable

Give an example of a problem about FSAs, Regular Expression and Regular Sets that is not solvable?

  Perform this algorithm on a scanned photograph

Perform this algorithm on a scanned photograph and compare with nonadaptive unsharp masking.

  How deep can the stack get in the worst case

The discussion of Quicksort in Section 7.5 described using a stack instead of recursion to reduce the number of function calls made.

  Design an algorithm to simulate multiplication by addition

Design an algorithm to simulate multiplication by addition. Your program should accept as input two integers (they may be zero, positive, or negative).

  Discuss the process for creating xml documents

Discuss the process for creating XML documents and apply this knowledge to develop XML and DTD documents.

  Find the continuation lines for a value

Next break the revised set of key value strings into the keys and values. Again use regular expressions to do this. Then create the names vector from these keys and values.

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