@Vinay : Can you please explain the algorithm of your code..
On 10/7/07, Vinay Chilakamarri <[EMAIL PROTECTED]> wrote:
>
> How about recursive way:
>
> int funcNoDiv(int divisor, int dividend)
> {
> //base case
> if(divisor == dividend)
> {
> return 1;
> }
>
> else if( divisor > divide
Sorry but lets start with a quotient of 1
On 10/7/07, Vinay Chilakamarri <[EMAIL PROTECTED]> wrote:
>
> How about recursive way:
>
> int funcNoDiv(int divisor, int dividend)
> {
> //base case
> if(divisor == dividend)
> {
> return 1;
> }
>
> else if( divisor > dividend)
> {
> r
How about recursive way:
int funcNoDiv(int divisor, int dividend)
{
//base case
if(divisor == dividend)
{
return 1;
}
else if( divisor > dividend)
{
return 0;
}
else // divisor < dividend
{
while(divisor <= dividend)
{
divisor = divisor << 1;
r
use subtraction in a loop till remainder is smaller then divisor.
On 10/7/07, megha <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I am looking for the program/algorithm to implement division without
> using divide operator?
>
> Any idea?
>
> Thanks
>
>
> >
>
--
Ciao,
Ajinkya
--~--~-~--~
given N x N matrix of positive and negetive intergers. Write some code
that finds the sub-matrix with teh maximum sum of its elements.
Any ideas?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm G
Hi all,
I am looking for the program/algorithm to implement division without
using divide operator?
Any idea?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group,
On 10/7/07, macharla pradeep <[EMAIL PROTECTED]> wrote:
>
> Hi,
> if ( commnad sequence is bad )
> whether to include it area calculation or not??
>
It is mentioned that command sequence is never bad.
> On 10/5/07, piruk <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi.
> > How to solve this ta
Hi,
if ( commnad sequence is bad )
whether to include it area calculation or not??
On 10/5/07, piruk <[EMAIL PROTECTED]> wrote:
>
>
> Hi.
> How to solve this task?
>
>
> Areameter is a turtle-like self-propelled vehicle controlled by
> sequences of commands transmitted over a radio channel
I guess it is binary search tree. Try this and you will get what you
want.
On Sep 26, 5:12 am, "mukesh agrawal" <[EMAIL PROTECTED]> wrote:
> What is binary index tree ? I googled it finding irrelevent information ...
> help needed ..
>
> On 9/25/07, Mohammad Naser Zandy <[EMAIL PROTECTED]> wrote: