@shady - can u elaborate upon the companies offering research jobs to
undergrads...
On Sun, Sep 18, 2011 at 10:02 AM, shady sinv...@gmail.com wrote:
it doesn't matter what your background is if you are able to clear
technical interviews of google and facebook. about MS and yahoo, they may
I am supposing that file is count.txt and is already exists
so in initials of the main()
do this
*int count;
FILE* fp;
if((fp=fopen(count.txt,r))==NULL)
{
printf(File does not exist\n);
exit(0):
}
fscanf(fp,%d,count);
count++;
fclose(fp);
fp=fopen(count.txt,w);
fprintf(fp,%d,count);
#includestdio.h
main()
{
int a ;
a=abc();
printf(\n %d this is fisrt a:,a);
a=abc();
printf(\n %d this is second a:,a);
}
int abc()
{
int i=23;
if(10)
return ;
i++;
return(++ i);
}
--
You received this message because you are subscribed
#includestdio.h
main()
{
int a ;
a=abc();
printf(\n %d this is fisrt a:,a);
a=abc();
printf(\n %d this is second a:,a);
}
int abc()
{
int i=23;
if(10)
return ;
i++;
return(++ i);
}
--
You received this message because you are subscribed
given n nodes ,how many different possible tree can be formed??(not
necessary that all are binary treeit could be any tree...)
--
*WITH REGARDS,*
*
*
*KARTIK SACHAN*
*B.TECH 3rd YEAR*
*COMPUTER SCIENCE AND ENGINEERING*
*NIT ALLAHABAD*
--
You received this message because you are
result is not defined by standard c. It doesnt produce compiler error just
because return type is int and no value is returned in if(10)
basically garbage
On Sun, Sep 18, 2011 at 12:23 PM, Bhavesh agrawal agr.bhav...@gmail.comwrote:
#includestdio.h
main()
{
int a ;
a=abc();
it is just printing some garbage value as u have specified return but not
the value.try putting some value with return then you'll understand
what's happening..
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
http://gplus.to/amolsharma99
@what's special in this ...
it is giving 0 in both cases.
basically a garbage value
--
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,
2nCn/(n+1) ..simple maths :)
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
http://gplus.to/amolsharma99
http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://youtube.com/amolsharma99
On Sun, Sep 18, 2011 at 12:37
result is this
-1075990972 this is fisrt a:
30 this is second a
what is the meaning of a=30 in second call
--
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
Error.
the 10 condition does not return anything, while the function should return
an int.
On Sun, Sep 18, 2011 at 6:39 AM, hurtlocker bhavesh24...@rediffmail.comwrote:
#includestdio.h
main()
{
int a ;
a=abc();
printf(\n %d this is fisrt a:,a);
a=abc();
0 this is fisrt a:
0 this is second a:
On Sun, Sep 18, 2011 at 12:09 PM, hurtlocker bhavesh24...@rediffmail.comwrote:
#includestdio.h
main()
{
int a ;
a=abc();
printf(\n %d this is fisrt a:,a);
a=abc();
printf(\n %d this is second a:,a);
}
int abc()
{
For the mentioned scenario, it seems to be the only feasible solution.
On Sun, Sep 18, 2011 at 3:57 AM, bharatkumar bagana
bagana.bharatku...@gmail.com wrote:
@anup : the time complexity will be very high ... O(n*M*M)...n=#characters
to be checked...M=size of the matrix ...
On Sat, Sep 17,
(2n)! / ((n+1)! + (n)!)
Where n is the number of nodes.
The above mentioned formula is for the n'th Catalan number.
@all correct me if I am wrong
On Sun, Sep 18, 2011 at 7:11 AM, Amol Sharma amolsharm...@gmail.com wrote:
2nCn/(n+1) ..simple maths :)
--
Amol Sharma
Third Year
Vivek, if there are more god companies going to visit ur college, then u can
wait for them. Everything depends on your interest, but if you want to go
for pure coding companies, then u should skip delloite. Amazon is also
coming for intern, u can wait for that..
Thanks
Saurabh Agrawal
BE CSE
another que..
#includestdio.h
main()
{
int a;
int i=10;
printf(%d %d %d\n,i+++i,i,i---i);
printf(%d\n,i---i);
a=i---i;
printf(%d \n%d,a,i);
return 0;
}
output:
18 10 0
0
0
8
how ??
--
You received this message because you are subscribed to the Google Groups
again undefined in standard c :)
On Sun, Sep 18, 2011 at 1:49 PM, Bhavesh agrawal agr.bhav...@gmail.comwrote:
another que..
#includestdio.h
main()
{
int a;
int i=10;
printf(%d %d %d\n,i+++i,i,i---i);
printf(%d\n,i---i);
a=i---i;
printf(%d \n%d,a,i);
You are given a binary tree in which each node contains a value. Design an
ALGORITHM to print all paths which sum up to that value. Note that it can be
any path in the tree - it does not have to start at the root.
--
*prasanth*
--
You received this message because you are subscribed to the
hi prasanth,
i was asked a similar ques but with the condition that path shud terminate
at a leaf node u just have to return true if you are able to find a path.
what i did was,
- do an inorder traversal (u have to pass a parameter that represents
sum as well along with treenode pointer)
for your question -
On Sun, Sep 18, 2011 at 3:44 PM, abhishek sharma abhishek.p...@gmail.comwrote:
hi prasanth,
i was asked a similar ques but with the condition that path shud terminate
at a leaf node u just have to return true if you are able to find a path.
what i did was,
- do
Can some one please help me with this..
the problem is to find the longest substring in a list of around 100
strings..??
any idea..
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
struct string_node
{
char str[];
int length;
struct string_node *ptr;
}
now traverse the strings and saving strings in str[],their length in
length and point it to next string_node
On Sun, Sep 18, 2011 at 4:47 PM, pooja pooja27tan...@gmail.com wrote:
Can some one please help me
sorry.. i meant the longest common substring..
eg. consider 4 string.. ababa , bab , babba, abab
so the longest common substring is bab.
On Sep 18, 4:40 pm, Yogesh Yadav medu...@gmail.com wrote:
struct string_node
{
char str[];
int length;
struct string_node *ptr;
}
now traverse the
store strings in array of pointers...char *str[100]
str[0]str[99]
make every possible suffix and prefix for each string...
for ex. str[0]=ababa
possible suffix={ababa,abab,aba,ab,a}
possible prefix={ababa,baba,aba,ba,a}
so make a structure for storing these suffix and prefixes and their
usigned long long x = 0x12345678;
int a = 0x09;
int b = 0x10;
printf(a=%x, b=%llx,a,b,c);
the result is: a=9,b=123456780010
i wonder why~~
can anyone explain it?
thanks.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
which profile is better??
1. Technology Consulting
2. Quality Control Analyst Systems
if one is from software engg ( programming) background.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
depends on your forte. :)
best of luck for either one :)
On Sun, Sep 18, 2011 at 10:15 PM, vivek goel vivek.thapar2...@gmail.comwrote:
which profile is better??
1. Technology Consulting
2. Quality Control Analyst Systems
if one is from software engg ( programming)
rite! 62.5%
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan
On Sat, Sep 17, 2011 at 9:04 PM, malay chakrabarti m1234...@gmail.comwrote:
create a tournament tree.in each round one value is eliminated to obtain
in the process the winner or the highest value in n-1
@Amol:the answer u have given is for binary ..and thats catalan
number...recursive solution
On Sun, Sep 18, 2011 at 1:33 PM, Anup Ghatage ghat...@gmail.com wrote:
(2n)! / ((n+1)! + (n)!)
Where n is the number of nodes.
The above mentioned formula is for the n'th Catalan number.
@malay: how cm n+logn-2?
cn u explain the logic ?
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan
On Sun, Sep 18, 2011 at 11:07 AM, Ashima . ashima.b...@gmail.com wrote:
rite! 62.5%
Ashima
M.Sc.(Tech)Information Systems
4th year
BITS Pilani
Rajasthan
On Sat,
2n!/n!(n+1)!
catalan number
also asked by directi in written ...
wasim akram
MCA 3rd year
--
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
hmm, nice questions, can we create an efficient DS to query the
strings ??
tried using trie but memory prints are very large ( O(n^2) )? :-((
On Sep 18, 12:59 pm, Anup Ghatage ghat...@gmail.com wrote:
For the mentioned scenario, it seems to be the only feasible solution.
On Sun, Sep 18,
Answer 3 - 100
Answer 6 - 103
Answer 4 - 194 total processes including the parent
Answer 7 - 12 km south, 12 km east
On Sun, Sep 18, 2011 at 11:53 PM, Ashima . ashima.b...@gmail.com wrote:
@malay: how cm n+logn-2?
cn u explain the logic ?
Ashima
M.Sc.(Tech)Information Systems
4th year
for(i = 0; i n; i++)
for(j = 0; j n; j++){
setColor(i, j) = black;
if(A[i][j] == str[0]){
setColor(i, j) = blue;
a = findWord(A, i, j, str, 1)
if(!a) setColor(i, j) = black;
else break;
}
}
findWord(A, i, j, str, k){
if(k
how to find second largest element than current element in an array given
condition that we have to find that second largest element from index 1 to
the index of the current element only in most efficient way
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
--
You received this
how to find second largest element than current element in an array given
condition that we have to find that second largest element from index 1 to
the index of the current element
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
--
You received this message because you are
@Nithin Garg how 194 for the 4 question?
On Mon, Sep 19, 2011 at 12:26 AM, Nitin Garg nitin.garg.i...@gmail.comwrote:
Answer 3 - 100
Answer 6 - 103
Answer 4 - 194 total processes including the parent
Answer 7 - 12 km south, 12 km east
On Sun, Sep 18, 2011 at 11:53 PM, Ashima .
Check out what u have written...
On Sun, Sep 18, 2011 at 7:17 PM, wujin chen wujinchen...@gmail.com wrote:
usigned long long x = 0x12345678;
int a = 0x09;
int b = 0x10;
printf(a=%x, b=%llx,a,b,c);
the result is: a=9,b=123456780010
i wonder why~~
can anyone explain it?
thanks.
Give some examples ,i m not getting ur question
On Mon, Sep 19, 2011 at 1:45 AM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:
how to find second largest element than current element in an array given
condition that we have to find that second largest element from index 1 to
the index of
Hi all,
When I take negation of an integer in C, 0 is displayed as -1
~5 is displayed as -6.
Can some one tell me the logic of how this conversion is happening in C?
Arun
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group,
sorry , it should be :
usigned long long c = 0x12345678;
int a = 0x09;
int b = 0x10;
printf(a=%x, b=%llx,a,b,c);
2011/9/19 sagar pareek sagarpar...@gmail.com
Check out what u have written...
On Sun, Sep 18, 2011 at 7:17 PM, wujin chen wujinchen...@gmail.comwrote:
usigned long long x =
@Arun: This is the way two's complement arithmetic works. For any x, -
x = ~x + 1. This says that to negate a number, complement it and add
1.
Technically speaking, two's complement is a weighted code. Each bit
position has a certain weight that is added in if the bit in that
position is a 1.
@Wujin: What do you expect the output to be? How does it differ from
what you actually get?
Dave
On Sep 18, 8:47 am, wujin chen wujinchen...@gmail.com wrote:
usigned long long x = 0x12345678;
int a = 0x09;
int b = 0x10;
printf(a=%x, b=%llx,a,b,c);
the result is: a=9,b=123456780010
i
Thanks Dave , appreciate it
On Sun, Sep 18, 2011 at 7:15 PM, Dave dave_and_da...@juno.com wrote:
@Arun: This is the way two's complement arithmetic works. For any x, -
x = ~x + 1. This says that to negate a number, complement it and add
1.
Technically speaking, two's complement is a
2's complement
On Mon, Sep 19, 2011 at 3:56 AM, Arun Vishwanathan
aaron.nar...@gmail.comwrote:
Hi all,
When I take negation of an integer in C, 0 is displayed as -1
~5 is displayed as -6.
Can some one tell me the logic of how this conversion is happening in C?
Arun
--
You received this
agreeing with Malay.
Better depends upon where you want to see yourself after 5 years or so.
PS: Please try to give some meaningful subject line before
On 18 September 2011 22:25, malay chakrabarti m1234...@gmail.com wrote:
depends on your forte. :)
best of luck for either one :)
On Sun,
Going by choice of your subject line, none.
--
On Sun, Sep 18, 2011 at 10:15 PM, vivek goel vivek.thapar2...@gmail.comwrote:
which profile is better??
1. Technology Consulting
2. Quality Control Analyst Systems
if one is from software engg ( programming)
sry, in the findWord function all a's are different e.g
a0, a1a7
and if(!a) is actually if(a0||a1||...||a7)
thnx
piyush
On Mon, Sep 19, 2011 at 1:10 AM, Piyush Grover piyush4u.iit...@gmail.comwrote:
for(i = 0; i n; i++)
for(j = 0; j n; j++){
setColor(i, j) = black;
current position is index n (say)
largest=0;
second_largest=0;
for(i=1;i=n;i++)
{
if(a[i]a[n])
{
if(a[i]largest)
{
second_largest=largest;
largest=a[i];
}
elseif(a[i]second_largest)
second_largest=a[i];
}
}
On Mon, Sep 19, 2011 at 2:15 AM, sagar pareek sagarpar...@gmail.com wrote:
Give
Suffix Tree
On Sep 18, 4:17 pm, pooja pooja27tan...@gmail.com wrote:
Can some one please help me with this..
the problem is to find the longest substring in a list of around 100
strings..??
any idea..
--
You received this message because you are subscribed to the Google Groups
Algorithm
50 matches
Mail list logo