@carl-Sorry was making suffix array by naive approx in the link
http://en.wikipedia.org/wiki/Suffix_array .there are more optimized algos
for it...!! thanks
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Somebody could explain to me why this happen:
x = (131);
printf(%d\n,x);
if(x0) x = -x;
printf(%d\n,x);
Output:
-2147483648
-2147483648
Wladimir Araujo Tavares
*Federal University of Ceará http://lia.ufc.br/%7Ewladimir/
Homepage http://lia.ufc.br/%7Ewladimir/ |
int
Wladimir Araujo Tavares
*Federal University of Ceará http://lia.ufc.br/%7Ewladimir/
Homepage http://lia.ufc.br/%7Ewladimir/ |
Maratonahttps://sites.google.com/site/quixadamaratona/|
*
On Tue, Aug 21, 2012 at 1:28 PM, gmagog...@gmail.com gmagog...@gmail.comwrote:
what type is x?
Yanan
int
Wladimir Araujo Tavares
*Federal University of Ceará http://lia.ufc.br/%7Ewladimir/
Homepage http://lia.ufc.br/%7Ewladimir/ |
Maratonahttps://sites.google.com/site/quixadamaratona/|
*
On Tue, Aug 21, 2012 at 1:28 PM, gmagog...@gmail.com gmagog...@gmail.comwrote:
what type is x?
Yanan
@Wladimirufc: You responded that the type is int. This data type (usually)
is 32 bits in length, and stores integers in the twos-complement number
system. See http://en.wikipedia.org/wiki/Two%27s_complement for an
explanation of this number system. In this number system, the bits
(numbered 0
@dave Nice explanation!
Yanan Cao
On Tue, Aug 21, 2012 at 10:32 AM, Dave dave_and_da...@juno.com wrote:
@Wladimirufc: You responded that the type is int. This data type (usually)
is 32 bits in length, and stores integers in the twos-complement number
system. See
class StringTimes
{
public static void main(String args[])
{
String str=Hi;
long i=2;
String get;
get=stringTimes(str,i);
System.out.println(get);
}
public static String stringTimes(String str,long x)
{
int i;
String set=str;
for(i=0;in-1;i++)
{
set+=str;
}
return set;
}
}
OUTPUT should
Can anyone suggest solution for this problem?
You are given an unsigned integer.Write a function to print the next
number which will be having same number of 1 bits present in given num.
eg) 6(110) to 9(1001)
--
You received this message because you are subscribed to the Google
a) count total no of bit set in given no
b) increment the given no by one and count the no of bit set in it if it
equal to the above count then return else increment the no till u get the
count equals the above one.
--
You received this message because you are subscribed to the Google Groups
what error it is showing
On Wed, Aug 22, 2012 at 12:41 AM, Rajesh Kumar testalgori...@gmail.comwrote:
class StringTimes
{
public static void main(String args[])
{
String str=Hi;
long i=2;
String get;
get=stringTimes(str,i);
System.out.println(get);
}
public static String
I understand two complement but i don`t knew it this instruction x = -x
was translate in x =(~x) + 1
thanks!
Wladimir Araujo Tavares
*Federal University of Ceará http://lia.ufc.br/%7Ewladimir/
Homepage http://lia.ufc.br/%7Ewladimir/ |
Maratonahttps://sites.google.com/site/quixadamaratona/|
*
@Megha: Answered in one line of code in the post
https://groups.google.com/d/msg/algogeeks/Fa-5AQR3ACU/jlmjb_nEZCsJ, which
also contains a link to an explanation of how the algorithm works.
Dave
On Tuesday, August 21, 2012 8:23:21 AM UTC-5, megha agrawal wrote:
Can anyone suggest
@Wladimirufc: As I said, this is the functional equivalent. Most computer
cpus would have a negate instruction which performs these operations in the
chip's circuitry, or achieve the same result by subtraction from zero.
Dave
On Tuesday, August 21, 2012 4:58:14 PM UTC-5, wladimirufc wrote:
Your program will give the compilation error because you escaped `` by
putting \.
If you remove the `` escape then it works fine.
C has fixed set of escape character which it understand and if it is unable
to understand then it remove the escape character(\) and keep the remaining
part.
In
14 matches
Mail list logo