Write functions for both addition and subtraction, Data Structure & Algorithms

You will write functions for both addition and subtraction of two numbers encoded in your data structure. These functions should not be hard to write. Remember how you add and subtract numbers in base 10 and you should be able to figure out how to do it. Addition should automatically calculate the sum of memory locations 1 and 2 and store the answer in memory location 3 (erasing any other number that was previously in memory location 3). Subtraction should automatically calculate memory location 1 minus memory location 2 and store the answer in memory location 3 (again, erasing any previous data).

Posted Date: 3/20/2013 2:47:35 AM | Location : United States







Related Discussions:- Write functions for both addition and subtraction, Assignment Help, Ask Question on Write functions for both addition and subtraction, Get Answer, Expert's Help, Write functions for both addition and subtraction Discussions

Write discussion on Write functions for both addition and subtraction
Your posts are moderated
Related Questions
Q. Assume that we have separated n elements in to m sorted lists. Explain how to generate a single sorted list of all n elements in time O (n log m )?

What are the things require to implement ADT Abstract data types are very useful for helping us understand the mathematical objects which we use in our computations but, of cou

1)    The set of the algorithms whose order is O (1) would run in the identical time.  True/False 2)    Determine the complexity of the following program into big O notation:

What is the best-case number of comparisons performed by mergesort on an input sequence of 2 k distinct numbers?


In this unit, we will describe a data structure called Graph. Actually, graph is a general tree along no parent-child relationship. In computer science, Graphs have several applica

Define the Internal Path Length The Internal Path Length I of an extended binary tree is explained as the sum of the lengths of the paths taken over all internal nodes- from th

Q. Draw  the structures of complete  undirected  graphs  on  one,  two,  three,  four  and  five vertices also prove that the number of edges in an n vertex complete graph is n(n-1

The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum One node

Write an algorithm for searching a key from a sorted list using binary search technique 1.   if (low > high) 2.     return (-1) 3.    mid = (low +high)/2; 4    .if ( X