Comp. sci algorithms, Data Structure & Algorithms

1. develop an algorithm which reads two decimal numbers x and y and determines and prints out wether x>y or y>x. the input values, x and y, are whole number > or equal to 0, which are input by a single read, i.e. they cannot be read or "looked at" digit by digit. The two input values are guaranteed not to be equal to one another. for this question its is not possible to compare two numbers directly, however, comparison of two digits is allowed. you are allowed to use of all basic arithmetic operations. As well, n named sub-algorithm called Power (a,b), when invoked returns a^b, can be used.
Posted Date: 9/23/2012 3:13:21 PM | Location : United States







Related Discussions:- Comp. sci algorithms, Assignment Help, Ask Question on Comp. sci algorithms, Get Answer, Expert's Help, Comp. sci algorithms Discussions

Write discussion on Comp. sci algorithms
Your posts are moderated
Related Questions
How do you rotate a Binary Tree?  Rotations in the tree: If after inserting a node in a Binary search tree, the balancing factor (height of left subtree - height of right

Tree is dynamic data structures. Trees can expand & contract as the program executes and are implemented via pointers. A tree deallocates memory whereas an element is deleted.

Q. The reason bubble sort algorithm is inefficient is that it continues execution even after an array is sorted by performing unnecessary comparisons. Therefore, the number of comp

Program will demonstrate the insertion of an element at desired position /* Inserting an element into contiguous list (Linear Array) at particular position */ /* contiguous_

Best Case: If the list is sorted already then A[i] T (n) = c1n + c2 (n -1) + c3(n -1) + c4 (n -1)  = O (n), which indicates that the time complexity is linear. Worst Case:

Program: Creation of a Circular linked list ALGORITHM (Insertion of an element into a Circular Linked List) Step 1        Begin Step 2      if the list is empty or new

null(nil) = true                     // nil refer for empty tree null(fork(e, T, T'))= false   //  e : element , T and T are two sub tree leaf(fork(e, nil, nil)) = true leaf(

HSV Colour Model Instead of a set of colour primaries, the HSV model uses colour descriptions that have a more intuitive appeal to a user. To give a colour specification, a use

Define Hashing. Store the following values in a hash table of table size 11 using division method: 25, 42, 96, 101, 102, 162, and 197. In case of collision, use other hash functio

Example 3: Travelling Salesman problem Given: n associated cities and distances among them Find: tour of minimum length that visits all of city. Solutions: How several