here start is pointing to string constant which is created in read-only
memory which can't be changed.so modifying it in the for loop causes
segmentation fault
declare it as a array type
On Tue, Feb 15, 2011 at 12:36 PM, rahul rahulr...@gmail.com wrote:
char *start is const char *start, pointer
Hi all,
I would like to invite you all to participate in Bytecode 2011, a
6-hour ACM ICPC style algorithm intensive online programming
competition. Bytecode is organized as a part of Pragyan 2011, the
International Level Techno-Managerial Festival of National Institute
of Technology,
---
SUDHIR MISHRA wants to stay in better touch using some of Google's coolest new
products.
If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-62d5befb93-3fceb99bf3-oYX-pec-NCYCzMLIBV7yRJ6EMUI
You'll
got it clear.. thanks guys.
On Tue, Feb 15, 2011 at 1:46 PM, jagannath prasad das
jpdasi...@gmail.comwrote:
here start is pointing to string constant which is created in read-only
memory which can't be changed.so modifying it in the for loop causes
segmentation fault
declare it as a array
CALL FOR PAPERS
and
Call For Workshop/Session Proposals
CGVR'11
The 2011 International Conference on Computer Graphics
and Virtual Reality
Date and Location:
@Akshata
I managed to get AC with majority algorithm.
suggestions:
1) You can try to read input and find candidate in same loop
2) Use scanf and printf
Thanks,
Balaji.
On Tue, Feb 15, 2011 at 4:30 PM, jai gupta sayhelloto...@gmail.com wrote:
#includestdio.h
#includestring.h
Given a byte array, in which characters can be 1 byte or 2 bytes long
For 1-byte characters, the Most significant bit must be 0. For a 2-
byte character, the most significant bit of the most significant byte
must be one and the most significant bit of the least significant byte
is don’t care (X).
the idea is to check how far the imagination can go
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Insert only one line in the function change() so that the output of the
program is 10.
You are not allowed to use exit(). You are not allowed to edit the function
main() or to
pass the parameter to change()
void change()
{
// Code here
}
int main()
{
int i=5;
change();
printf(“%d” ,i);
return 0;
as i see this would need synchronization...
anyone tried it so far?
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
give an example as what to do .. tha language of the question is not clear
to me
On Tue, Feb 15, 2011 at 5:32 PM, bittu shashank7andr...@gmail.com wrote:
Given a byte array, in which characters can be 1 byte or 2 bytes long
For 1-byte characters, the Most significant bit must be 0. For a 2-
void change()
{
printf(10); while(1) {}
}
On Feb 15, 10:17 am, Balaji S balaji.ceg...@gmail.com wrote:
Insert only one line in the function change() so that the output of the
program is 10.
You are not allowed to use exit(). You are not allowed to edit the function
main() or to
pass the
after termination of semicolon , that will be considered a separate line i
guess
On Tue, Feb 15, 2011 at 10:59 PM, Don dondod...@gmail.com wrote:
void change()
{
printf(10); while(1) {}
}
On Feb 15, 10:17 am, Balaji S balaji.ceg...@gmail.com wrote:
Insert only one line in the function
A semicolon is valid in the middle of a line in C or C++.
For instance, no one says that
for(i = 0; i 10; ++i)
is three lines of code.
Don
On Feb 15, 11:31 am, jalaj jaiswal jalaj.jaiswa...@gmail.com wrote:
after termination of semicolon , that will be considered a separate line i
guess
Mike Johnson wrote:
Plesae rite a program for me to find prime nummers. It should be recursive
prorgram. What duz that mean?
If u type a nummer like 10 it should say 1 is prime, 2 is prime, 3 is prime,
4 is not prime up to 10.
This iz not homewurk I just thout of it myself. Lol.
/* Sure
Nothing... 10 in base 5 = 5 in base 10.
void change(){
printf(); //...?
}
2011/2/15 Don dondod...@gmail.com
A semicolon is valid in the middle of a line in C or C++.
For instance, no one says that
for(i = 0; i 10; ++i)
is three lines of code.
Don
On Feb 15, 11:31 am, jalaj
Hello,
we like to invite you all to participate in Online Programming Contest
organized as a part of Daksh 2011, an international level Technical
festival of SASTRA University, Thanjavur, Tamilnadu
We have two competitions:
1) DOPE
Dope is a 6 hour ACM ICPC style algorithmic competition with team
void change()
{
#define i i=10,n
}
this will do..
On Tue, Feb 15, 2011 at 11:33 PM, Rel Guzman Apaza rgap...@gmail.comwrote:
Nothing... 10 in base 5 = 5 in base 10.
void change(){
printf(); //...?
}
2011/2/15 Don dondod...@gmail.com
A semicolon is valid in the middle of a
nice solution
--
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 to
algogeeks+unsubscr...@googlegroups.com.
For more
The solution is..
_AX = 10;
can anyone explain??
--
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 to
here is my approach.
shared variables : in, out
shared memory : buf[N]
writer
while(1)
{
while(in+1 % N ==out)
{ // waiting
}
buf[in+1]= input;
in = in+1 % N
}
reader
while(1)
{
while(out == in)
{ // waiting
}
output = buf[out]
out = out+1 % N
}
On Tue, Feb
@Abhijit. Does your code takes O(N^2)? I think the following code
would do it in O(N)
iterate the string once:
void remove(char *a){
if(!a){
int i = 0, j = 1;
while(a[j]!='\0'){
if(i0 || a[i]!=a[j]){
can any1 tell me the question .. m gettin half of the post ,...
On Wed, Feb 16, 2011 at 10:41 AM, Jammy xujiayiy...@gmail.com wrote:
@Abhijit. Does your code takes O(N^2)? I think the following code
would do it in O(N)
iterate the string once:
void remove(char *a){
stack for sure..
pop out the enteries till they r same and push this entry back once.
On Wed, Feb 16, 2011 at 11:18 AM, jalaj jaiswal
jalaj.jaiswa...@gmail.comwrote:
can any1 tell me the question .. m gettin half of the post ,...
On Wed, Feb 16, 2011 at 10:41 AM, Jammy xujiayiy...@gmail.com
hash would be a perfect choice.
I make a MinMaxHash class which would keep track of the min and max
value of the key.(since in this case we would never remove a key, thus
this primitive approach works. Otherwise use treeMap)
class MinMaxHash extends HashMap{
private Integer min =
25 matches
Mail list logo