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
Q. Write down a non recursive algorithm to traverse a binary tree in order.                    Ans: N on - recursive algorithm to traverse a binary tree in inorder is as

The Ruby Programming Language Although data structures and algorithms we study aren't tied to any program or programming language, we need to write particular programs in speci

In file access: what is the difference between serial, sequential and indexed sequential searching

When there is requirement to access records sequentially by some key value and also to access records directly by the similar key value, the collection of records may be organized

Which data structure is required to change infix notation to postfix notation?    Stack function is used to change infix notation to postfix notatio n

Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.

perform the following length operation LENGTH("welcome to ICA")=

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g. (define stack1 (make-stack))  (define stack2 (make-stack)) W

Q. Write down any four applications or implementation of the stack.                                     Ans. (i)       The Conversion of infix to postfix form (ii)

The space-complexity of the algorithm is a constant. It just needs space of three integers m, n and t. Thus, the space complexity is O(1). The time complexity based on the loop