ANSI standard specifies that during right shift of a negative number
the shift MUST be a logical shift with sign extension. So,
when right shifted will logically with sign extention it
gives (in hex).
So the answer is [A].
--
You received this message because you are
Note that (in hex) is 2's complement representation of -1.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
Thanks Dave
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this
On Aug 3, 8:42 am, Raj N rajn...@gmail.com wrote:
1) Can a constructor call another constructor to initialize the same
object?
Answer: Yes.
2) Can a struct variable be assigned to another if the structure
contains an array as a field?
Answer: Yes.
3) Can we pass a private member by
For a function call that utilizes some other function, yes. A default
value to an argument of a function is treated as a local variable of
the function.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
#includestdio.h
int main()
{
printf(%x\n, (unsigned)-11);
return 0;
}
this will give you the expected result.
Cheers,
venki
VENKATARAMAN.GB
If Its Upto Be, It Is Upto Me
On Mon, Aug 9, 2010 at 3:53 PM, Avik Mitra tutai...@gmail.com wrote:
Note that (in
when loadfactor reaches a specified value, then you have to increase the
size of the table which is used for storing the hash values. Otherwise ,
there would be more collisions if the size is not increased.
On Fri, Aug 6, 2010 at 11:11 AM, aparichith vineelyalamar...@gmail.comwrote:
Can some
Given two sorted positive integer arrays A(n) and B(n), we define a
set S = {(a,b) | a \in A and b
\in B}. Obviously there are n2 elements in S. The value of such a pair
is defined as Val(a,b) = a +
b. Now we want to get the n pairs from S with largest values.
How to do this in O(nlogn) time.
--
we can merge the 2 arrays in sorted manner. Now from the 2nd last number,we
can have the first pair (last,second last).From the 3rd last,we can have 2
pairs (last,3rd last) and (2nd last,3rd last). similarly we will keep on
taking till we get n pairs.
time complexity: O(2n+n)- O(n)
space
Since the arrays are sorted, you should be able to do this in O(n) time.
a[1..n], b[1..n]
output a[n], b[n]
int count=1;
while (i 0 and j 0 and count n)
Begin
if (a[i-1] * b[j] = a[i] * b[j-1])
Begin
Output a[i-1] b[j]
i=i-1;
End
else
Begin
Given a text file, implement a solution to find out if a pattern
similar to wild cards can be detected.
fort example find if a*b*cd*, or *win or *def* exists in the text.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group,
nice onefor searching first u need to build the suffix tree for each
letter with * once u do it perform a search
in other word u need to implement grep command rite??
On Mon, Aug 9, 2010 at 7:00 PM, amit amitjaspal...@gmail.com wrote:
Given a text file, implement a solution to find out if a
ignore my last post :(
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options,
An XOR linked list compresses the same information into *one* address field
by storing the bitwise XOR of the address for *previous* and the address
for *next* in one field:
... AB C D E ...
– A⊕C - B⊕D - C⊕E -
When you traverse the list from
This is pretty standard stuff. Look up finite automaton.
On Aug 9, 9:30 am, amit amitjaspal...@gmail.com wrote:
Given a text file, implement a solution to find out if a pattern
similar to wild cards can be detected.
fort example find if a*b*cd*, or *win or *def* exists in the text.
--
You
15 matches
Mail list logo