. How to reverse all the bits in a unsigned integer? an signed
integer (you have to keep the sign of the integer)?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send
For the following definition of a binary tree node
typedef struct _Node
{
_Node * Left;
_Node * Rigth;
_Node * Parent;
} Node;
Given 2 nodes u and v from a tree, find the closest common
ancestor
of u and v?
Node* ClosestCommonAnces
traverse the tree layer by layer.
void BF_Traverse(Node* r)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe
How to count the 1 bits in a integer?
int Count1Bits(int i);
How about this function is used very often?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send e
Using 4 binary bits you can represent 16 numbers, from to
. How can you print all these 16 numbers in binary format, i.e.
"",
"0001", "0010" You can choose whatever order to print.
Now give you n bits, how can you print out all the n bit numbers in
binary format?
Can you write a r
int main()
{
int n=9,half;
char a[9][9];
if(n%2 == 0)
half = n/2;
else
half = n/2 + 1;
for(int i=0; i wrote:
> OK, I need to write an algorithm to populate a 2D array A(i,j) of size
> n x n. There is 1 '*' in the 1s
On Mar 9, 5:05 am, "infinite" <[EMAIL PROTECTED]> wrote:
> Find solutions to cormen Algorithms book in files section
that is just wonderful
thanks a lot
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algor
hi Peri,
you can't use this
int number
int array[number];
and also wat is the value of "number"?
array size should be constant.
example
int array[10];
if you not sure about array size initially and need to assign at run
time then you need to allocate it as dynamic.
you can do something like thi
generate fibonacci numbers untill it exceeds given number x.
i.e.
n1=1;
while(n<=x){
prev=n1;
n1 = next fibonacci number;
}
n2= n1+prev;
any comments??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm
question is to form a spiral metrix
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email
this question was asked by Google..
"Write a program of spiral matrix"
ie. it takes inputs and puts in to matrix as a spiral..example.
given : 3 X 4 matrix
your input in this order : 1 5 8 9 10 7 4 8 0 2 3 6
will generate following matrix
1 5 8 9
2 3 6 10
0 8 4 7
and big O notatio
11 matches
Mail list logo