Explore BrainMass
Share

Explore BrainMass

    Arrays

    Arrays in java

    Write the definition of a method, isReverse , whose two parameters are arrays of integers of equal size. The method returns true if and only if one array is the reverse of the other. ("Reverse" here means same elements but in reverse order.) So, suppose you had two int arrays, forward and backward, each with 4 elements. N

    Simple script

    Create a script that uses the following components: explicit declaration, an array, sub procedure, RUNAT=Server, and a function.

    Computer Programming

    Multi-dimensional arrays could cost a lot of memory. How much memory (how many bytes) does it take to create an integer array of 3 dimensions, with each dimension having 1000 elements (i.e. int myHugeArrays[1000] [1000] [1000])? Explain your answer.

    big-inteter calculator program

    Write a big-inteter calculator program that allows the user to enter two large integers and the operation to be performed and that calls the appropriate function to carry out the designated operation. **NOTE: I need the solution in C++ Code.

    Deadlocks

    Specification Implement the Banker's algorithm described in Section 8.5.3 using C/C++. Your program should ... 1) Prompt user to enter the size of matrix n and m. Your program should accept any n x m matrix and m vectors where n and m are positive integer less than 10. 2) Read in Allocation, Max, and Available from all

    Range Selection of Unsorted Array

    Write a method findRanks in Java that accepts an unsorted array of integers vals, and a starting and ending rank start and end, numbering ranks from 0, and returns an unsorted (any order is acceptable) array containing the lo-th through the hi-th elements, inclusive, of vals. int[] findRanks(int[] vals, int lo, int hi)

    one-dimensional array and its components

    Explain what a one-dimensional array and its components are. Explain why arrays are useful, and how they are created within Visual Basic .NET. Finally, explain how two-dimensional arrays are different than one-dimensional arrays. Thank you

    Arrays, vector<T>s, and STL

    If x denotes the mean of a sequence of numbers x1, x2,.....xn, the variance is the average of the squares of the deviations of the numbers from the mean, and the standard deviation is the square root of the variance. Write functions to calculate the mean, variance, and standard deviation of the values stored in an array and a d

    Arrays, Vector<T>s, and STL: Rinky Dooflingy Company

    The Rinky Dooflingy Company manufactures different kinds of doofingies, each identified b a product number. Write a program that reads product number and prices and stores these values in two arrays, number and price;number[0] and price[0] are the product number and unit price for the first item, number[1] and price[1] aare the

    Arrays, vector<T>s, and STL

    Write a big-inteter calculator program that allows the user to enter two large integers and the operation to be performed and that calls the appropriate function to carry out the designated operation.

    Shortest Prefixes are emphasized.

    Shortest Prefixes Input: Prefix .in Output: Prefix .out A prefix of a string is a substring string at the beginning of the given string. The prefixes of "carbon" are: "c", "ca", car", "carb", "carbo", and "carbon". Note that the empty string is not considered a prefix in this problem, but every non-empty string is conside

    Arrays of Objects

    This program has 2 parts. The purpose is to design a payroll program that uses array of objects to store the employees' information. Assume that the minimum wage is $6.0, and standard work load is 40 hours per week. Declare them as named constants with global scope. (See attachment for full question)

    What would be the checksum field in a single parity bit scheme?

    Suppose that the information content of a packet is the bit pattern 1111000010100101 and an even parity is being used. a. What would be the checksum field in a single parity bit scheme? b. What would be the value of the checksum field b for the case of a two-dimensional parity scheme? Your answer should be such that a mini

    Modifying the Bellman-Ford Algorithm

    Show how to modify the Bellman-Ford algorithm to find and print a negative weight cycle (reachable from the source, s) in a weighted directed graph G if one exists. If there is no negative weight cycle, your algorithm should print out "no negative weight cycle reachable from". If there is a negative weight cycle reachable from

    parent array produced by Dijkstra's algorithm

    Here is a proposed algorithm to solve the single source shortest paths problem in a weighted directed graph G with possibly negative edges weights, but no negative weight cycles: Form the graph G' from G by adding the same positive number, p, to all of the edge weights in the graph. This positive number should be chosen so th

    Representations - queues and lists

    Q1.Suppose an array with 6 rows and 8 columns is stored in row major order starting at address 20 (base ten). If each entry in the array requires only one memory cell, what is the address of the entry in the third row and fourth column? What if each entry requires two memory cells? Q2.Describe how an array could be used to i

    Show the sequence of elements

    One common way to implement a list is using an array. This project is to work with an ordered list. An ordered list is a list on which all the elements are stored in ascending order, which is a bit more efficient than an unordered list in performing some operations such as lookup. To preserve its property, one should always inse

    This C++ program reads in information about a list of books

    The attached is a C program which reads in information about a list of books from the keyboard, stores the information in an array of structure, and finally displays it on the screen. The information about a book includes its code (an integer value) and price (a floating point value). Code 9999 serves as a sentinel value indicat

    Theory of Computation with a Vending Machine

    Problem: Consider a vending machine that accepts nickels, dimes and quarters. 1. Give an implicit definition of the set of all strings whose value mod 30 = 0. 2. Give recursive definition of the set of all strings whose value = 30 cents. See attachment for the full and formatted problem.

    Example of an array in java using a sample program.

    Write all the code for a class called ArrayQsn. This class will contain two methods. The first method runningSumMean accepts an array of ints as a parameter, and will return the mean of the values as a double. It also changes the values of the array so that they are running sum values. For example, the array: {2, 4, 5, 1, 3}

    Computing an Arithmetic Mean, Median and Mode

    C programming: I need to compute an arithmetic mean(average), median, and mode for up to 50 test scores. The data are contained in a text file. To determine the median, I must first sort the array. The median is the score in the middle of the range. This can be determined by selecting the score at last/2 if last is odd. The mod

    Sorting

    I need to compute an arithmetic mean(average), median, and mode for up to 50 test scores. The data are contained in a text file. To determine the median, I must first sort the array. The median is the score in the middle of the range. This can be determined by selecting the score at last/2 if last is odd. The mode is th