as per my knowledge
1)this is not swapping of the strings, use double indirection (use swap
function swap(char **t1, char **t2))
2)you cant change the address of the any array,(use change it to char
*t1=xyz,*t2=abc; )
Thank you,
Sid.
On Wed, Sep 7, 2011 at 11:26 AM, piyush agarwal
I assume you expect to see the strings interchanged. But you are not
changing anything in the memory. So in main(), pstr[0] and pstr[1] contains
whatever was there earlier. If you change the parameters of the swap to
swap(char **,char **), pass the addresses of pstr[0] ,pstr[1] and then do
my mistake,
for 2)you cant change the address of the any array,(use change it to
char *t1=xyz,*t2=abc; )
i thought pstr is array of array of strings(but is array of character
pointer),
@sachindraac is right
char *pstr[2] = {Hello, piyush};
Thank you,
Sid.
On Wed, Sep 7, 2011 at 11:34 AM,
@piyush
the output will hello piyushit's due to following reason
you've declared array of 2 pointers to character(char *pstr[2]),which means
hello and piyush are stored somewhere else but your array is having only
starting addresses of each string.now when you are calling swap
check the case 63 62 46 71 28 39 43 24 36 12
You have to find 3rd largest 62
your case you will miss 62 in your first iteration
On Wed, Sep 7, 2011 at 9:41 AM, Anup Ghatage ghat...@gmail.com wrote:
Here is another one. Pardon me if it goes by some other name.
Divide the array in K parts.
http://www.daniweb.com/software-development/c/threads/339649
Thank you,
Sid.
On Wed, Sep 7, 2011 at 11:43 AM, siddharam suresh
siddharam@gmail.com wrote:
my mistake,
for 2)you cant change the address of the any array,(use change it to
char *t1=xyz,*t2=abc; )
i thought pstr is array of
Somebody has already posted it.
Karthik R,
RD Engineer,
Tejas Networks.
On Wed, Sep 7, 2011 at 10:15 AM, shivank goyal goyalshiva...@gmail.comwrote:
NIT Durgapur guys and other college students where tejas networks have
visited, kindly share some questions that Tejas Networks have asked
can anybody tell me the code of find the prime no. and after finding prime
no. find its prime factore using linkes list??
--
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
+1 dave.
Sanju
:)
On Tue, Sep 6, 2011 at 3:40 PM, Dave dave_and_da...@juno.com wrote:
@Srivastav: Yeah. You need more parens:
printf(%d,(int)(3.14*6.25*6.25));
Without the extra parens, the 3.14 is cast to an int, but then
implicitly recast to a double for the multiplications. With the
Funtions that should be used to implemnt chess board movements which
covers all concepts of cpp( no need of implementation. Just names of
methods enough)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Check this
http://andreinc.net/2010/09/30/generic-data-structures-in-c/
On Tue, Sep 6, 2011 at 10:02 PM, Puneet Ginoria punnu.gino...@gmail.comwrote:
i am getting things in C++ but i need all this to be done in C.
--
You received this message because you are subscribed to the Google Groups
The frequency is also stored in the heap right? So to do heapify based on
frequency, first you have to spot the element on the heap. That itself will
take O(n). [ Heapfying after that takes only O(log n) ] If you use a hashmap
and store frequencies, and each time mostFrequent is called, do a
hai in gcc compiler of fedora 14
int main()
{
int a=4;
printf(%d %d %d %d,++a,++a,++a,++a);
return 0;
}
o/p 7 7 7 7
but if i replace ++a with a++ in above expn i am getting o/p as 7 6 5 4
why ?? can u explain ?
thanks in advance...
--
You received this message because you
+1 to anup
On Wed, Sep 7, 2011 at 8:08 AM, Anup Ghatage ghat...@gmail.com wrote:
I think It depends on the IP version you willbe using.
If it is IPv4 then it is:
struct in_addr and struct sockaddr_in
If it is IPv6 then it is:
struct in6_addr and struct sockaddr_in6
Also there is a
@htross ... thanks a lot :) .. can u plz elaborate what ques were
asked in further rounds and also about level of difficulty in written
test?? also on which topic written was concentrated ?? i mean like
time dist in aps...time complexity in algo like tat...plz
share ..tomorrow company is coming
prime no has only 2 factors. number itself and 1.
On Wed, Sep 7, 2011 at 12:14 PM, aayush jain ajain...@gmail.com wrote:
can anybody tell me the code of find the prime no. and after finding prime
no. find its prime factore using linkes list??
--
You received this message because you
ok...
@yogesh tell me code of using prime factore of any no. using linked
list.
--
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
call it as : bipartition(a,-1,2) . coz at the very first time k is being
incremented so it needs intiiale value -1.
On Sat, Sep 3, 2011 at 8:46 PM, Siddhartha Banerjee thefourrup...@gmail.com
wrote:
please check out the code, doesnt give right solution on running...
or perhaps i missed
null is a macro defined in stdio.h which is equal to 0 . so sizeof(0) is 4
:)
On Wed, Sep 7, 2011 at 2:44 AM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:
and why sizeof(NULL) is giving 4 any ans?
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT ALLAHABAD*
--
*UTKARSH
hey its compiler dependent ... no meaning in discussing such questions as
standard c considers it as a undefined behaviour
On Wed, Sep 7, 2011 at 1:08 PM, annarao kataru kataruanna...@gmail.comwrote:
hai in gcc compiler of fedora 14
int main()
{
int a=4;
printf(%d %d %d
sieve of erathothenes algo
On Wed, Sep 7, 2011 at 1:36 PM, Yogesh Yadav medu...@gmail.com wrote:
prime no has only 2 factors. number itself and 1.
On Wed, Sep 7, 2011 at 12:14 PM, aayush jain ajain...@gmail.com wrote:
can anybody tell me the code of find the prime no. and after finding
you are just changing the pointers . so second ptr will point to third
string and third will point to second string
On Wed, Sep 7, 2011 at 11:34 AM, Shachindra A C sachindr...@gmail.comwrote:
I assume you expect to see the strings interchanged. But you are not
changing anything in the memory.
Sukran +1
--
Regards
Saurabh Araiyer
http://www.decapsulatingabstraction.blogspot.com
--
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
@Victor:
Instead of 0 and 1, shouldn't it be like DP[i-1][j-1] + 0 and DP[i-1]
[j-1] + 1
On Sep 7, 1:10 am, Victor Manuel Grijalva Altamirano
kavic1.mar...@gmail.com wrote:
Try with DP, a little modicated of Edit Distance algorithm
State i=the begin of the word , j=the end of the word
If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then
how many artists r
required to make 25 paintings using 25 canvases in 25 days?
some sayin 25,some sayin 1...can anyone pls explain the answer
for this puzzle...
--
You received this message because you are subscribed
i think it should be 1.
5/2 paintings r made by 5/2 ppl in 5/2 days using 5/2 canvas
= 1 painting is made by 1 person in 1 day using 1 canvas
i.e. 1 guy cn make a painting in 1 day using a canvas.
Now, the other case, to make 25 paintings using 25 canvases in 25 days.
As there r 25 days total
finally what's the answer
On Sep 7, 5:36 pm, rahul vatsa vatsa.ra...@gmail.com wrote:
again sry, its 1 oly :P
On Wed, Sep 7, 2011 at 8:35 AM, rahul vatsa vatsa.ra...@gmail.com wrote:
sry, wrongly i ve written 1 in 1st ln of my prev mail. its 25.
On Wed, Sep 7, 2011 at 8:30 AM,
@Rahul: No, no, no. If you double the people and don't change the
number of days, you double the number of paintings. Similarly, if you
double the number of days and don't change the number of people, you
double the number of paintings. The number of paintings is _jointly
proportional_ to the
@sushanth, its 1.
@dave, no of days no of paintings required are 25. And we need to find out
how many ppl r required for this. obviously it will be 1 only.
if there will be more than 1 guy, the work will be finished before 25 days.
On Wed, Sep 7, 2011 at 9:11 AM, Dave dave_and_da...@juno.com
@Rahul: You are OBVIOUSLY wrong. Obviously.
On Sep 7, 8:16 am, rahul vatsa vatsa.ra...@gmail.com wrote:
@dave, no of days no of paintings required are 25. And we need to find out
how many ppl r required for this. obviously it will be 1 only.
if there will be more than 1 guy, the work will be
Figure out the man days per painting:
5/2 artists working for 5/2 days is 25/4 man days.
They produce 5/2 paintings, so that is 5/2 man days per painting.
Thus to make 25 paintings will require 25*5/2 man days.
To complete that work in 25 days will require 5/2 painters.
Don
On Sep 7, 7:15 am,
don u r rt :-)
On Wed, Sep 7, 2011 at 10:00 AM, Don dondod...@gmail.com wrote:
Figure out the man days per painting:5/2 artists working for 5/2 days is
25/4 man days.
They produce 5/2 paintings, so that is 5/2 man days per painting.
Thus to make 25 paintings will require 25*5/2 man days.
@ kunal
I was attempting this problem: http://www.spoj.pl/problems/NHAY/
here,input size of haystick is not limited so,can you tell me how to
read the
haystick.
On Sep 7, 12:06 am, Kunal Patil kp101...@gmail.com wrote:
If I understand question correctly, then just read as many characters as
@Rahul: Wasn't I correct, too?
Dave
On Sep 7, 9:07 am, rahul vatsa vatsa.ra...@gmail.com wrote:
don u r rt :-)
On Wed, Sep 7, 2011 at 10:00 AM, Don dondod...@gmail.com wrote:
Figure out the man days per painting:5/2 artists working for 5/2 days is
25/4 man days.
They produce 5/2
ya dave u r also correct :-)
On Wed, Sep 7, 2011 at 10:21 AM, Dave dave_and_da...@juno.com wrote:
@Rahul: Wasn't I correct, too?
Dave
On Sep 7, 9:07 am, rahul vatsa vatsa.ra...@gmail.com wrote:
don u r rt :-)
On Wed, Sep 7, 2011 at 10:00 AM, Don dondod...@gmail.com wrote:
enum piece {white_pawn, white_rook, white_knight, white_bishop,
white_queen, white_king,
black_pawn, black_rook, black_knight, black_bishop,
black_queen, black_king};
void newGame();// Initialize the board with
pieces in their starting locations
bool
While traveling at uniform speed. U read a two digit no. after one hr
the number is reversed order. After another hour the number read is same
two digit number. What is the average speed?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
Clearly you are sitting still looking at a Route 66 sign.
Don
On Sep 7, 10:09 am, Mani Bharathi manibharat...@gmail.com wrote:
While traveling at uniform speed. U read a two digit no. after one hr
the number is reversed order. After another hour the number read is same
two digit number. What
lmao
Yanan Cao
On Wed, Sep 7, 2011 at 10:14 AM, Don dondod...@gmail.com wrote:
Clearly you are sitting still looking at a Route 66 sign.
Don
On Sep 7, 10:09 am, Mani Bharathi manibharat...@gmail.com wrote:
While traveling at uniform speed. U read a two digit no. after one hr
the
But 106 is neither the same as 16 nor is 106 a two-digit number.
Mani, if you are going to repost something we've already discussed to
death, please at least state the problem correctly.
Don
On Sep 7, 10:12 am, gmagog...@gmail.com gmagog...@gmail.com wrote:
First number: 16
second : 61
third:
Can anyone plzz xplain the code?
public static int swapOddEvenBits(int x) {
return ( ((x 0x) 1) | ((x 0x) 1) );
}
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
when is index of a table used?
a)when table is less range of values
b)when table is used frequently
c) when the table is small
d)when we use join statement with select and where clause.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
0xa == 0x 1010, which stands for all the even bits
0x5 == 0x 0101, which stands for all the odd bits
1 and 1 means shifting odd to even and even to odd
then | means putting new even bits and odd bits together
Yanan Cao
On Wed, Sep 7, 2011 at 10:23 AM, teja bala
Option a) i didn't understand properly, please elaborate!!
Option b) certainly yes.
Option c) No (remember, the size of the table is subjective)
Option d) yes (use index on the column used in the where clause)
On Wed, Sep 7, 2011 at 8:58 PM, Mani Bharathi manibharat...@gmail.comwrote:
when
How many processes are created in this snippet?
Main()
{
Fork();
Fork() fork () || fork ();
Fork ();
}
--
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
*There were few elephants and an equal number of mahouts.Half of the mahouts
were sitting on the elephants and half were walking.Totally there was 84
legs,hw many elephants were there?*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view
14 elephants
On Wed, Sep 7, 2011 at 9:10 PM, Mani Bharathi manibharat...@gmail.comwrote:
*There were few elephants and an equal number of mahouts.Half of the
mahouts were sitting on the elephants and half were walking.Totally there
was 84 legs,hw many elephants were there?*
--
You
how?
mahouts sitting on the elephants shouldn't be considered
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/9hWKNBJXPYEJ.
To post to this group, send
why wont u consider those.. Its no where mentioned in the problem that u are
not supposed to count those mahouts sitting on the elephants... The
statement is just to make it tricky nothing else...
On Wed, Sep 7, 2011 at 9:19 PM, Mani Bharathi manibharat...@gmail.comwrote:
how?
mahouts
hey is it 4 child processes along wid one parent
process.??
m i rite??
On Wed, Sep 7, 2011 at 9:09 PM, Mohit Goel mohitgoel291...@gmail.comwrote:
How many processes are created in this snippet?
Main()
{
Fork();
Fork() fork () || fork ();
Fork ();
}
--
You
a. 15
b. 19
c. 21
d. 27
e. 31
these are the only options.
--
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
which is the best site where in can find backtracking and branch and bound
programs ?
On Wed, Sep 7, 2011 at 8:58 PM, gmagog...@gmail.com gmagog...@gmail.comwrote:
0xa == 0x 1010, which stands for all the even bits
0x5 == 0x 0101, which stands for all the odd bits
1 and 1 means shifting odd
19 prs will be created, total 20 prs.
we have discussed this a few days back. plz check the old thread for any
explanation.
On Wed, Sep 7, 2011 at 12:01 PM, Mohit Goel mohitgoel291...@gmail.comwrote:
a. 15
b. 19
c. 21
d. 27
e. 31
these are the only options.
--
You received
can anyone explain me how?? plsss
On Wed, Sep 7, 2011 at 9:40 PM, rahul vatsa vatsa.ra...@gmail.com wrote:
19 prs will be created, total 20 prs.
we have discussed this a few days back. plz check the old thread for any
explanation.
On Wed, Sep 7, 2011 at 12:01 PM,
am getting 16.8 elephants :( ...if i dont consider the legs of mahout that
are sitting on elephant
On Wed, Sep 7, 2011 at 9:23 PM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
why wont u consider those.. Its no where mentioned in the problem that u
are not supposed to count those
wats the ans... 21??
On Wed, Sep 7, 2011 at 9:42 PM, vivek goel vivek.thapar2...@gmail.comwrote:
can anyone explain me how?? plsss
On Wed, Sep 7, 2011 at 9:40 PM, rahul vatsa vatsa.ra...@gmail.com wrote:
19 prs will be created, total 20 prs.
we have discussed this
ups...19 i guess
On Wed, Sep 7, 2011 at 9:52 PM, Dheeraj Sharma
dheerajsharma1...@gmail.comwrote:
wats the ans... 21??
On Wed, Sep 7, 2011 at 9:42 PM, vivek goel vivek.thapar2...@gmail.comwrote:
can anyone explain me how?? plsss
On Wed, Sep 7, 2011 at 9:40 PM,
which one is right?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/ZQGyC-Ku3bEJ.
To post to this group, send email to algogeeks@googlegroups.com.
To
int main()
{
fork();
fork() fork() || fork();
fork();
return 0;
}
ln 1 : will create 2 prs
ln 2 : will create 10 process for each existing pr
ln 3 : will do fork for all 10 process, nd so now u ve 20 prs
the main issue is @ln-2 in main( )
Ln 2 :
here for 1st fork, if its parent,
ishant is rt, nowher in the qstn its mentioned dat oly standing legs hs to
be counted. so 84/(2+4) = 14 pair of elements mahouts.
On Wed, Sep 7, 2011 at 12:27 PM, Mani Bharathi manibharat...@gmail.comwrote:
which one is right?
--
You received this message because you are subscribed to the
You have an array in which every number is repeated odd number of times
except one. Write a function to find that one element in O(n) time.
--
*Sandeep Kumar,*
( Mobile +91-9866507368
*“I believe in smart work, Believe Me”*
--
You received this message because you are subscribed to the
Lets consider there are n elephants so there are equal number of mahaouts ie
n.
Now if we consider only men standing on ground to be counter for legs it
comes out to be 4n + (n/2)*2 = 5n, so 84 should be multiple of 5n which is
not hence this assumption of counting only standing men for legs is
Has Barclays or Tally Solutions visited any campus so far?
If it has, please let me know about the kind of questions that were
asked in its written test..the test would most probably be conducted
by Elitmus (we've already had the elitmus aptitude test)
--
You received this message because you
I want to know about the technical test..
On Wed, Sep 7, 2011 at 10:49 PM, vartika vartika.aggarwa...@gmail.comwrote:
Has Barclays or Tally Solutions visited any campus so far?
If it has, please let me know about the kind of questions that were
asked in its written test..the test would most
#includestdio.h
#includeconio.h
#define prn(a) printf(%d ,a)
#define print(a,b,c) prn(a),prn(b),prn(c)
#define max(a,b) (ab)?b:a
void main()
{
int x=1,y=2;
clrscr();
print(max(x++,y),x,y);
printf(\n%d %d\n,x,y);
print(max(x++,y),x,y);
printf(\n%d
yet to come to our campus. I am also having ELitmus test on 12, can you tell
me about the level of test and few ques if u remember.
On Wed, Sep 7, 2011 at 10:50 PM, vartika aggarwal
vartika.aggarwa...@gmail.com wrote:
I want to know about the technical test..
On Wed, Sep 7, 2011 at 10:49
“Kya-Kya” is an island inhabitants of which always answer any question with
two
answers , one of which is true and the other is false .
1.You are walking on a road and came to a park . You ask the inhabitants Ram
, Laxman and Lila , “which road will
take me to the village ?”Ram says “I never
20 is not in option ..so whats the answer??
--
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
@mohit:answer is 19.one is the parent process originally.and 19 more
processes have been created.
On Wed, Sep 7, 2011 at 11:21 PM, Mohit Goel mohitgoel291...@gmail.comwrote:
20 is not in option ..so whats the answer??
--
You received this message because you are subscribed to the Google
its 19...as 19 prcses are created
On Wed, Sep 7, 2011 at 11:21 PM, Mohit Goel mohitgoel291...@gmail.comwrote:
20 is not in option ..so whats the answer??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
thnks everyone...
--
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 options, visit
@Rahul - Can you explain the logic and complexity?
On Wed, Sep 7, 2011 at 11:06 PM, Rahul Thankachan rahul29ma...@gmail.comwrote:
On Sep 7, 12:43 pm, Sandy sandy.wad...@gmail.com wrote:
You have an array in which every number is repeated odd number of times
except one. Write a function
i don't think it's of O(n)
for even it's actually easy. Take the xor of all the elements you will left
with the element which appears odd number of times. O(n)
but for the odd case, we need to use extra space. Use hash map to keep the
count of each number and
take the odd one out, i mean the even
1. a)
2. c)
3. b)
cnt get the 4th one
On Wed, Sep 7, 2011 at 11:08 PM, Mani Bharathi manibharat...@gmail.comwrote:
“Kya-Kya” is an island inhabitants of which always answer any question with
two
answers , one of which is true and the other is false .
1.You are walking on a road and came to
4. a)
On Wed, Sep 7, 2011 at 11:56 PM, Rashmi Jain rashmi.jain...@gmail.comwrote:
1. a)
2. c)
3. b)
cnt get the 4th one
On Wed, Sep 7, 2011 at 11:08 PM, Mani Bharathi manibharat...@gmail.comwrote:
“Kya-Kya” is an island inhabitants of which always answer any question
with two
answers
ans of 2 should be (b)
On Wed, Sep 7, 2011 at 2:29 PM, Rashmi Jain rashmi.jain...@gmail.comwrote:
4. a)
On Wed, Sep 7, 2011 at 11:56 PM, Rashmi Jain rashmi.jain...@gmail.comwrote:
1. a)
2. c)
3. b)
cnt get the 4th one
On Wed, Sep 7, 2011 at 11:08 PM, Mani Bharathi
1.)a
2.)b
3.)b
4)b
On Wed, Sep 7, 2011 at 11:08 PM, Mani Bharathi manibharat...@gmail.comwrote:
“Kya-Kya” is an island inhabitants of which always answer any question with
two
answers , one of which is true and the other is false .
1.You are walking on a road and came to a park . You ask
4) a and b
On Thu, Sep 8, 2011 at 12:08 AM, Piyush Grover piyush4u.iit...@gmail.comwrote:
1.)a
2.)b
3.)b
4)b
On Wed, Sep 7, 2011 at 11:08 PM, Mani Bharathi manibharat...@gmail.comwrote:
“Kya-Kya” is an island inhabitants of which always answer any question
with two
answers , one of
thanks guyz...
On Wed, Sep 7, 2011 at 11:37 PM, algogeeks@googlegroups.com wrote:
Today's Topic Summary
Group: http://groups.google.com/group/algogeeks/topics
- os #1324512a54426818_group_thread_0 [4 Updates]
- answer these interesting questions #1324512a54426818_group_thread_1[1
You are most welcome Sushaanth :D
LOL
On Wed, Sep 7, 2011 at 2:43 PM, sushaanth s sushaant...@gmail.com wrote:
thanks guyz...
On Wed, Sep 7, 2011 at 11:37 PM, algogeeks@googlegroups.com wrote:
Today's Topic Summary
Group: http://groups.google.com/group/algogeeks/topics
os [4 Updates]
Do anyone know what kind of questions facebook ask in their coding
interview??
Wht should I prepare...
--
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
they will give a puzzle kind of problem .. and you will have to code to
output the solution .. i think it was a 75 min coding round.
On Thu, Sep 8, 2011 at 12:17 AM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
Do anyone know what kind of questions facebook ask in their coding
can u please explain this code or give the link to the thread u
mentioned before???
On Sep 7, 10:35 pm, nagarajan naga4...@gmail.com wrote:
please can u explain.. or copy the explained content???
On Wed, Sep 7, 2011 at 11:03 PM, sukran dhawan sukrandha...@gmail.comwrote:
its already
It can be done in O(n) time using a hash table as shown by the following
pseudo code:
function FindEvenRepeter(arr[])
hash_table = empty
sum = 0
for x in arr
if (x is present in hash_table)
sum = sum ^ x
else
add x to hash_table
return sum
@Sandy: It can be done in O(n) time with O(n) extra space by sorting
the data with a radix sort and then scanning the array for the element
you are seeking.
Dave
On Sep 7, 11:43 am, Sandy sandy.wad...@gmail.com wrote:
You have an array in which every number is repeated odd number of times
future first is coming to our college.what kind of questions will
be asked in first round
--
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,
Do reverse inorder and count number of nodes visited, Kth visited node will
be Kth largest.
Time : O(n)
Space : O(1)
On Mon, Sep 5, 2011 at 5:16 PM, bharatkumar bagana
bagana.bharatku...@gmail.com wrote:
@monish:
u'rs is correct , time =O(nlogn) Ok but, the constant behind this prog is
very
i think u can ignore number of canvases here...
artists and days are inversely proportional while artists and
paintings are directly proportional.
artistspaintingsdays
- --- -
5/25/2 5/2
so,
1 5/2 25/4
1/4
@Himanshu: You apparently are assuming that the data is presented in a
binary search tree, but the original problem stated that the data is
presented in an unordered array. You need to account for the
complexity of forming the bst and how much space it will take.
Dave
On Sep 7, 7:20 pm, Himanshu
Hi...
can u plzz tell me about the kind of puzzles they asked u and what sort of
coding questions they ask.. What they exactly look for ??
Thank u in advance...
On Thu, Sep 8, 2011 at 1:34 AM, Ankit Minglani ankit.mingl...@gmail.comwrote:
they will give a puzzle kind of problem .. and you
Try the facebook puzzle master page and few given puzzles there.
FB loves linux, mac a lot. Your exposure to these OS is a big plus.
Its all about puzzle solving and your approach to new problems.
On Sep 8, 1:04 am, Ankit Minglani ankit.mingl...@gmail.com wrote:
they will give a puzzle kind of
http://groups.google.com/group/algogeeks/browse_frm/thread/274f63b24388599d/da635c4f409d5e1b?lnk=gstq=print%28max%28x%2B%2B%2Cy%29%2Cx%2Cy%29%3B+#da635c4f409d5e1b
On Sep 8, 2:04 am, htross htb...@gmail.com wrote:
can u please explain this code or give the link to the thread u
mentioned
tally solution qstn are subjective it includes appti , c/c++ output ,sql nd
data structure mailny link list
--
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
Can any one pls post the questions that were asked in Adobe written test ???
And also pattern of the paper
--
Regards:
---
K Pavan Kumar
Computer Science Engg.
2nd Mtech, IIT Madras.
--
You received this message because you are subscribed to the Google Groups
what the pattern like?
Any papers or type of topics to stress on would be welcomed ...
--
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
@Don: given stack will be 20 1 3 1 5 1 6 1 2 1
Minimum Stack will be 20 1 1 1 1 1
After pop 1
min stack 20 1 1 1 1
pop 2
min stack 20 1 1 1 1
pop 1
min stack 20 1 1 1
pop 6
min stack 20 1 1 1
pop1
min stack 20 1 1
pop 5
min stack 20 1 1
pop 1
min stack 20 1
pop 3
min stack 20 1
pop
@Dave:
Can u pls provide the link for median of median algo in O(n) time ..
On Wed, Sep 7, 2011 at 11:44 AM, Karan Thakral karanthak...@gmail.comwrote:
check the case 63 62 46 71 28 39 43 24 36 12
You have to find 3rd largest 62
your case you will miss 62 in your first iteration
On
@sukran :
sieve of erathothenes algo gives only the prime numbers below a number ..
How can we find a number's all prime factors using this algo pls explain
...
On Wed, Sep 7, 2011 at 5:15 PM, sukran dhawan sukrandha...@gmail.comwrote:
sieve of erathothenes algo
On Wed, Sep 7, 2011 at
12
On Wed, Sep 7, 2011 at 8:46 AM, Vikram Singh singhvikram...@gmail.comwrote:
i m asking again, cos no one replied earlier:
in example given by mohit... is the leftmost right cousin of 8 and 9,
NULL or
12??
On Aug 27, 6:42 pm, aditi garg aditi.garg.6...@gmail.com wrote:
This grp is
guys there is subject called number theory and cryptography, in which
there are so many algos to find prime number and prime factors of the
number.
Thank you,
Sid.
On Thu, Sep 8, 2011 at 11:17 AM, bharatkumar bagana
bagana.bharatku...@gmail.com wrote:
@sukran :
sieve of erathothenes algo
1 - 100 of 101 matches
Mail list logo