Computer Science Homework Solutions

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) ...continues

Median of Three Worst Case Scenario

Suppy an array containing integers 1 through 12 such that a quicksort algorithm using median of three will recurse to 6 levels, counting the top level as 0; showing that even with median of three, quicksort has worst case performance of O(n^2). The pivot is then moved to the end and the partition is performed, then after the ...continues

data validations

I need help on how to validate these data in visual basic.net: 1. the password must not be same as employee ID and must contain 4-6 characters 2. email must ba a valid one 3. name and address fields cannot be left blank 4. maxium score must be postive number between 1 and 100 5. number of students must be posti ...continues

computer science

Given the first 20 bytes (in hexadecimal) of an Ethernet frame: AA AA AA AA AA AA AA AB CD EF 01 23 45 67 CD EF 02 46 8A CE 00 12 4B 8C a) What is the Source Address (in hexadecimal)?__________________ b) What is the length of the data field (in hexadecimal)? _______________ c) ...continues

Calculator

Looking for mortgage program to display 3 mortgage loans: 7 year at 5.35%, 15 year at 5.5 %, and 30 year at 5.75%. Use an array for the different loans Display the mortgage payment amount for each loan. Non-graphical user interface. Insert comments in the program to document the program. Build on this if possible using an a ...continues

FlowChart, Hierarch Chart and Pseudocode

A student borrows 3,000 at an interest rate of 2 % per month on the unpaid balance. If the student pays $200 at the end of each month, what is the remaining balance at the end of one year? How much interest has the studen paid fo the year? Output: Output consists of a screen display showingthe balance each month, remaini ...continues

Depth First Search

Hi I would appreciate if you could say if the statement below is TRUE or FALSE and explain why. Given a graph G, we might start a DFS from two different vertices, u and v. Any back edge in the DFS starting from u is also a back edge in the DFS starting from v. Thanks Annie

Fully connected graphs

Is it TRUE or FALSE that ( and why ) In an undirected graph(with no self loops), if every vertex has degree at least n/2, then the graph is fully connected ? Thanks

Huffman tree

Hi Please find correct answer and explain. Question: Consider the Huffman tree where the character frequencies are: Freq(A)=16, Freq(B)=8; Freq(C)=4;Freq(D)=2;Freq(E)=1;Freq(F)=1. The total length of the encoding with the above frequencies and the derived Huffman tree is: Answers: a) 62 b) 63 c) 64 d) ...continues

Create an appropriate user interface. Visual Basic

You've just started a new semester and you've become friends with one of your classmates, Tomislav. Tomislav tells you he has just moved to the United States from Europe and he's having a difficult time adjusting to the English units of measurement. In his country, most liquids are measured in liters, not gallons. Tomislav ...continues

Browse