Re: [algogeeks] Re: no of elements of the array

2011-09-15 Thread tech coder
+1 to don On Thu, Sep 15, 2011 at 9:40 PM, Don wrote: > Not really. Usually you would need a second parameter indicating the > size of the input. In theory it might be possible to put a marker > value at the end of the array. > > Most implementations of malloc store the size of the memory block

Re: [algogeeks] Find the element in Array

2011-09-15 Thread tech coder
1: use bit array(hashing) then only it is possible in O(n) On Fri, Sep 16, 2011 at 12:04 PM, tech coder wrote: > @ akshat read the question properly before posting such solution > > > On Wed, Aug 31, 2011 at 12:27 PM, Akshat Sapra wrote: > >> Solution: >> >> arr[n],sum = 0; >> >> >> for ( int

Re: [algogeeks] Find the element in Array

2011-09-15 Thread tech coder
@ akshat read the question properly before posting such solution On Wed, Aug 31, 2011 at 12:27 PM, Akshat Sapra wrote: > Solution: > > arr[n],sum = 0; > > > for ( int i = 0 ; i < n; i++ ) { >sum ^= arr[i]; > } > > print sum; // required number > > -- > > > Akshat Sapra > Under Graduat

Re: [algogeeks] Book for C++

2011-09-15 Thread mohan kumar
robert lafore On Mon, Sep 12, 2011 at 1:43 PM, Ankuj Gupta wrote: > Hi > > Which is a good book for C++ ( Robert Lafore or Bjarne Stroustrup or > Herbert Schildt) ? > > Ankuj > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post t

[algogeeks] Fwd: ThoughtWorks Programming Questions

2011-09-15 Thread sivaviknesh s
-- Forwarded message -- From: LOKE$[-] Date: Mon, Aug 22, 2011 at 4:13 PM Subject: Fwd: ThoughtWorks Programming Questions To: mitcse08info With regards Lokesh Chandrakumar - Hi , Attached are the links to the *ThoughtWorks programming questions* and solutions. * * *

[algogeeks] Re: Party Lamps

2011-09-15 Thread Don
Think about it. If lamp 1 is on, so is lamp 7, lamp 13, lamp 19, etc. Every button which affects lamp 1 affects lamp 7, 13, 19... in exactly the same way. The same holds for every lamp n. Lamp n+6*x is affected the same way. So you just need to figure out the state of lamps 1-6, and you know the re

[algogeeks] Fwd:

2011-09-15 Thread sivaviknesh s
-- Forwarded message -- From: sivaviknesh s Date: Fri, Sep 9, 2011 at 12:28 PM Subject: To: Pritpal Singh Interview Questions: Thoughtworks As said by senior- S.Abhinaya Round1: Logic test- some simple numerical problems.This doesn't require any special preparation. Try to ans

[algogeeks] Fwd: ThoughtWorks Programming Questions

2011-09-15 Thread sivaviknesh s
-- Forwarded message -- From: Sesha krishnan Date: Mon, Aug 22, 2011 at 6:04 PM Subject: Re: ThoughtWorks Programming Questions To: mitcse08i...@googlegroups.com All, We uploaded the thoughtworks interview questions from GCT yesterday @ http://yourbitsandbytes.com/viewforum.php?

[algogeeks] Re: Tech Mahindra

2011-09-15 Thread senthil
HI Prachi, Tech mahindra interveiew will be very easy for you 1st round written xam (online) which has aptitude questions very easy but you need to finish it on time.. 2nd round technincal round --questions from your course subjectswill be for an hr but easy... 3rd round HR round ---ju

[algogeeks] Fwd: Interview question in Thoughtworks

2011-09-15 Thread sivaviknesh s
-- Forwarded message -- From: sivaviknesh s Date: Fri, Sep 9, 2011 at 12:23 PM Subject: Fwd: Interview question in Thoughtworks To: Pritpal Singh -- Forwarded message -- From: sasi kumar Date: Sat, Jul 23, 2011 at 12:04 PM Subject: Fwd: Interview question in T

[algogeeks] Re: Tech Mahindra

2011-09-15 Thread siva viknesh
package ?? On Sep 14, 7:27 pm, Prachi Bhise wrote: > Tech Mahidra is going to visit in my collage for recruitment. > Does anyone knows which type of question ask in written test and interview. > > With Regards > Prachi Bhise > B.E (I.T) > Pune University -- You received this message because you

[algogeeks] Re: yahoo campus placements

2011-09-15 Thread siva viknesh
http://in.careers.yahoo.com/students/content/186 check this .. it has visited many colleges including trichy NIT .. contact them...kindly share ur experience after attending ... On Sep 15, 8:09 am, Akash Mukherjee wrote: > k...bt its a gud 2 weeks lefti guess der wud be sm other clg visits b

Re: [algogeeks] Re: Party Lamps

2011-09-15 Thread Mohammad Reza Rahmani
No body else can solve my problem??? -- 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 m

Re: [algogeeks] Re: Building a max heap takes O(n) time irrespective of the array being sorted / unsorted.

2011-09-15 Thread Terence
http://en.wikipedia.org/wiki/Binary_heap#Building_a_heap The algorithm of heap-building presented in most books is O(n). On 2011-9-16 12:52, Ankuj Gupta wrote: is talks of more tighter bound of O(nlogn) On Sep 15, 11:24 pm, sunny agrawal wrote: Read CLRS On Thu, Sep 15, 2011 at 11:51 PM

Re: [algogeeks] Re: Party Lamps

2011-09-15 Thread Mohammad Reza Rahmani
I did'nt exactly what you say why 6 adjacent lamps it just depend on the buttons not on lamps... "you just need to know if a certain button has been pushed..." you're true...and it has 4^10...is it right? why 2^4??? -- You received this message because you are subscribed to the Goog

[algogeeks] Re: Building a max heap takes O(n) time irrespective of the array being sorted / unsorted.

2011-09-15 Thread Ankuj Gupta
is talks of more tighter bound of O(nlogn) On Sep 15, 11:24 pm, sunny agrawal wrote: > Read CLRS > > On Thu, Sep 15, 2011 at 11:51 PM, saurabh agrawal wrote: > > > Building a max heap takes O(n) time irrespective of the array being sorted > > / unsorted. > > Can someone prove that. I already

Re: [algogeeks] C++ Query...

2011-09-15 Thread siddharam suresh
i saw better solution in stack over flow, but these things violates the Memory rules of C++ Thank you, Sid. On Thu, Sep 15, 2011 at 6:41 PM, teja bala wrote: > @ BHARATH > > exactly very thx > > > On Thu, Sep 15, 2011 at 5:22 PM, bharatkumar bagana < > bagana.bharatku...@gmail.com>

[algogeeks] Re: Interview Questions

2011-09-15 Thread Ankuj Gupta
It is still giving run time error On Sep 16, 4:40 am, Deoki Nandan wrote: > error due statement int*y; because it tries to allocate another pointer > being uninitialized .It may happen that garbage address which was given to x > is also try to give to y . This makes program crash ... > You can ch

Re: [algogeeks] Re: Interview Questions

2011-09-15 Thread Rohit Upadhyaya
#include int main() { int w=10; int *p=&w; int *x; x=(int *)malloc(sizeof(int)*1); *x=1000; int *y; y=(int *)malloc(sizeof(int)); *y=100; printf("%d %d %d",*x,*p,*y); return 0; } -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To pos

Re: [algogeeks] Interview Questions

2011-09-15 Thread sukran dhawan
run time error because pointer is not assigned a address and it will be pointing to some junk location so *x = 1000 will result in a run time error On Thu, Sep 15, 2011 at 11:32 PM, SAMMM wrote: > #include > #include > using namespace std; > > int main() > { > int w=10; > int *p=&w; > int *x;

[algogeeks] Re: Party Lamps

2011-09-15 Thread Don
Notice that every sixth lamp will always be in the same state. If you know the state of any 6 adjacent lamps you know the state of all lamps. In addition, you just need to know if a certain button has been pushed an even number of times or an odd number. Which even or odd number does not matter, an

Re: [algogeeks] Re: Math Puzzle

2011-09-15 Thread Ashima .
solution is =3 with the condition p!=0 and q!=0 and r!=0 Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Thu, Sep 15, 2011 at 10:38 PM, Piyush Grover wrote: > @abhinav... > > it's not about being over smart or to show someone or to prove someone > anything. It's just th

Re: [algogeeks] Party Lamps

2011-09-15 Thread Mohammad Reza Rahmani
just 2^4??? why??? we have 4^1 states and it's about 10^6000...This value is very big to perform complete search...Is it True? thank's On 9/16/11, Marcelo Amorim Menegali wrote: > Notice that changing the order of button presses doesn't change anything. > Notice also that pressing a button t

Re: [algogeeks] Programs

2011-09-15 Thread kartik sachan
soluntion for 1ST question is :http://ideone.com/LSOj6 # include# includechar checknonrepeat(char *a,int *b,int n){ int i; for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread Sandy
Lots of guys already have shared interesting facts. Here is a good saying - "Knowing that a bottle of COKE will burst like a fountain if opened after shaking. Someone who tries that to validate it has a Testing DNA" Here are some more differences that can help you make choices :) Developer:

Re: [algogeeks] An interesting question

2011-09-15 Thread saurabh singh
1st case http://ideone.com/mLd8U *On g++* *http://ideone.com/Zg7EF on gcc * 2nd case http://ideone.com/PgnvE On g++ http://ideone.com/MXGNu On gcc On Fri, Sep 16, 2011 at 3:42 AM, DeVaNsH gUpTa wrote: > Write a program that can be compiled on gcc but not on g++ or vice-versa? > > -- > Thanks and

Re: [algogeeks] Party Lamps

2011-09-15 Thread Marcelo Amorim Menegali
Notice that changing the order of button presses doesn't change anything. Notice also that pressing a button twice is the same as not pressing it. So, in the end, given N, there are at most 2^4 = 16 final configurations (each button is either pressed once or not). I hope this will help you. -- Ma

Re: [algogeeks] Re: Interview Questions

2011-09-15 Thread Deoki Nandan
error due statement int*y; because it tries to allocate another pointer being uninitialized .It may happen that garbage address which was given to x is also try to give to y . This makes program crash ... You can check it by making *y=1000; sttmnt as comment and run after that comment both statemen

[algogeeks] An interesting question

2011-09-15 Thread DeVaNsH gUpTa
Write a program that can be compiled on gcc but not on g++ or vice-versa? -- Thanks and Regards *Devansh Gupta* *B.Tech Third Year* *MNNIT, Allahabad* -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algo

[algogeeks] Re: Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread techankur
PEC main mca hai hi nahin :P khaali B.E and M.E hai and from this year they have started M.Sc Ankur On Sep 15, 11:41 pm, vivek goel wrote: > hey  ankur.. >  thnaks  for ur concern.. > *mca *was not eligible kya.. > > > > > > > > On Fri, Sep 16, 2011 at 12:04 AM, techankur wr

Re: [algogeeks] Party Lamps

2011-09-15 Thread Gaurav Menghani
On Thu, Sep 15, 2011 at 4:44 PM, Blackwizard wrote: > Hi > I want to solve this problem but I'm not sure about the algorithm... > I think It can be complete search... > Is the anybody to help me? > what's the algorithm for this question... > > Problem Link: > http://olympiads.win.tue.nl/ioi/ioi98/

[algogeeks] Party Lamps

2011-09-15 Thread Blackwizard
Hi I want to solve this problem but I'm not sure about the algorithm... I think It can be complete search... Is the anybody to help me? what's the algorithm for this question... Problem Link: http://olympiads.win.tue.nl/ioi/ioi98/contest/day1/party/party.html Thank's -- You received this messa

Re: [algogeeks] SPOJ PIE

2011-09-15 Thread Gaurav Menghani
One small observation, you can use the M_PI constant already available when you #include On Thu, Sep 15, 2011 at 3:57 PM, KK wrote: > http://www.spoj.pl/problems/PIE/ > I solved this using Binary Search its similar to shake shake shaky of > spoj... but still get WA :( > Plzz help... > > #include

[algogeeks] SPOJ PIE

2011-09-15 Thread KK
http://www.spoj.pl/problems/PIE/ I solved this using Binary Search its similar to shake shake shaky of spoj... but still get WA :( Plzz help... #include #include using namespace std; bool solve(int *pie, int n, int mid,int f) { int sum = 0; for (int i=0; i= f) return t

[algogeeks] Re: Nonuniform distribution

2011-09-15 Thread Don
Here is my solution: For a simple case, I'll use an example with N=3 and the probability distribution {0.25, 0.3, 0.45}. I want my event generator to produce 0 with probability 0.25, 1 with probability 0.3, and 2 with probability 0.45. I build a table of size N, with each cell being divided into

Re: [algogeeks] Re: Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread vivek goel
hey ankur.. thnaks for ur concern.. *mca *was not eligible kya.. On Fri, Sep 16, 2011 at 12:04 AM, techankur wrote: > @Vivek Microsoft is open for CSE and IT department (B.Tech/M.Tech).. > The eligibility is 7 CGPA > @Rahul we don't have any information about the profile b

Re: [algogeeks] Re: Interview Questions

2011-09-15 Thread vikas singh
On Thu, Sep 15, 2011 at 11:54 PM, SAMMM wrote: > I think u haven't ran the the code or compile it .. It give the output > as 1000 10 . > > > @SAMM : Dude, seg fault on g++ > Check tht .. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Gee

[algogeeks] Re: Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread techankur
@Vivek Microsoft is open for CSE and IT department (B.Tech/M.Tech).. The eligibility is 7 CGPA @Rahul we don't have any information about the profile being offered, currently just the written test is taken on 19th which would be for 1 hr, no pre placement talks nothing.. @abhinav I already own a co

Re: [algogeeks] Building a max heap takes O(n) time irrespective of the array being sorted / unsorted.

2011-09-15 Thread sunny agrawal
Read CLRS On Thu, Sep 15, 2011 at 11:51 PM, saurabh agrawal wrote: > Building a max heap takes O(n) time irrespective of the array being sorted > / unsorted. > Can someone prove that. I already know that Heap can be constucted in > o(n*log(n)) time. > > -- > You received this message because

[algogeeks] Re: Interview Questions

2011-09-15 Thread SAMMM
I think u haven't ran the the code or compile it .. It give the output as 1000 10 . Check tht .. -- 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 t

[algogeeks] Building a max heap takes O(n) time irrespective of the array being sorted / unsorted.

2011-09-15 Thread saurabh agrawal
Building a max heap takes O(n) time irrespective of the array being sorted / unsorted. Can someone prove that. I already know that Heap can be constucted in o(n*log(n)) time. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this gro

Re: [algogeeks] Re: Interview Questions

2011-09-15 Thread abhinav gupta
I dont knw man wat d hell is dis? On Thu, Sep 15, 2011 at 11:19 AM, SAMMM wrote: > No check It once more in G++ Compiler > > -- > 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.co

[algogeeks] Re: Interview Questions

2011-09-15 Thread SAMMM
No check It once more in G++ Compiler -- 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. Fo

Re: [algogeeks] Re: Interview Questions

2011-09-15 Thread abhinav gupta
Runtime error On Thu, Sep 15, 2011 at 11:16 AM, SAMMM wrote: > OK Now try this ... > > > #include > #include > using namespace std; > > int main() > { > int w=10; > int *p=&w; > int *x; > *x=1000; > printf("%d %d ",*x,*p); > return 0; > } > > Wht is the o/p ?? > > 1)10

[algogeeks] Re: Interview Questions

2011-09-15 Thread SAMMM
OK Now try this ... #include #include using namespace std; int main() { int w=10; int *p=&w; int *x; *x=1000; printf("%d %d ",*x,*p); return 0; } Wht is the o/p ?? 1)1000 10 2)1000 100 3)Compilation Error 4)Run Time Error Any Difference ?? -- You received this

[algogeeks] MS interview

2011-09-15 Thread teja bala
13. Propose an algo/data struct for memory manager. 14. Propose and algo/data struct for timer manager. -- 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

Re: [algogeeks] Interview Questions

2011-09-15 Thread abhinav gupta
Runtime error.. x pointing to unintialised memory..and then initialised,,, On Thu, Sep 15, 2011 at 11:02 AM, SAMMM wrote: > #include > #include > using namespace std; > > int main() > { > int w=10; > int *p=&w; > int *x; > *x=1000; > int *y; > *y=100; > printf("%d %d %d",*x,*p,*y); > ret

Re: [algogeeks] Interview Questions

2011-09-15 Thread Bhanu Kishore
Runtime Error due to the statetment *x = 1000; On Thu, Sep 15, 2011 at 11:32 PM, SAMMM wrote: > #include > #include > using namespace std; > > int main() > { > int w=10; > int *p=&w; > int *x; > *x=1000; > int *y; > *y=100; > printf("%d %d %d",*x,*p,*y); > return 0; > } > > > Wht is the

[algogeeks] Interview Questions

2011-09-15 Thread SAMMM
#include #include using namespace std; int main() { int w=10; int *p=&w; int *x; *x=1000; int *y; *y=100; printf("%d %d %d",*x,*p,*y); return 0; } Wht is the o/p ?? 1)1000 10 100 2)1000 10 10 3)Compilation Error 4)Run Time Error -- You received this message because you are subscribed

Re: [algogeeks] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread rahul sharma
programs will be on recursion and treesss On Thu, Sep 15, 2011 at 11:17 PM, rahul sharma wrote: > wich profyl is it ofering???it offers 8-9 lac for testing and 16 for > developer.i suggest to go 4 developer only n not for testing for future > growth...plz tell the profyl n package???n do tell

Re: [algogeeks] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread rahul sharma
wich profyl is it ofering???it offers 8-9 lac for testing and 16 for developer.i suggest to go 4 developer only n not for testing for future growth...plz tell the profyl n package???n do tell the questions after test On Thu, Sep 15, 2011 at 10:59 PM, abhinav gupta wrote: > y u all r worried a

Re: [algogeeks] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread abhinav gupta
y u all r worried abt MS...open up ur own cmpny... On Thu, Sep 15, 2011 at 10:13 AM, vivek goel wrote: > hey ankur. > > wat's eligibility criteria.. > and eligible branches... > *mca* is eligible ??. > > -- > You received this messag

Re: [algogeeks] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread vivek goel
hey nikhil, thanks a lot bro.. On Thu, Sep 15, 2011 at 8:10 PM, Nikhil Kumar wrote: > @vivek : If you opt for testing , you can always become a developer.It > won't go hard on you. > > And I don't really know about consultant, you have to ask some guy in the > force. > > > On Thu

Re: [algogeeks] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread vivek goel
hey ankur. wat's eligibility criteria.. and eligible branches... *mca* is eligible ??. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algog

Re: [algogeeks] Re: Math Puzzle

2011-09-15 Thread Piyush Grover
@abhinav... it's not about being over smart or to show someone or to prove someone anything. It's just that you should not take any assumptions by yourself or if you do you should specify clearly. If u r asked this question in an interview and you give the answer 3 without telling your assumption,

[algogeeks] Re: Math Puzzle

2011-09-15 Thread Don
Right, and in every proof above, at some point there is a possible division by zero. Therefore the proof is not valid in cases where R or P or Q are zero, and there are infinitely many such cases. The problem states P+Q+R=0 as the only constraint. There are infinitely many cases which fit that cons

Re: [algogeeks] Re: Math Puzzle

2011-09-15 Thread abhinav gupta
dude dats outside the domain of the qs...dont be oversmart. On Thu, Sep 15, 2011 at 9:49 AM, Don wrote: > No, not at all. Here is a trivial counterexample: > > P = Q = R = 0 > > Don > > On Sep 15, 11:46 am, abhinav gupta wrote: > > Shut up...its 3,, > > > > > > > > On Thu, Sep 15, 2011 at 9:43

Re: [algogeeks] Re: Math Puzzle

2011-09-15 Thread abhinav gupta
u cnt divide a number by 0..that thing is self undrstod On Thu, Sep 15, 2011 at 9:49 AM, Piyush Grover wrote: > Don is right > > if R = 0, P = 1 and Q = -1 then the given expression is UNDEFINED!!! > > > > On Thu, Sep 15, 2011 at 10:16 PM, abhinav gupta > wrote: > >> Shut up...its 3,, >>

[algogeeks] Re: Math Puzzle

2011-09-15 Thread Don
No, not at all. Here is a trivial counterexample: P = Q = R = 0 Don On Sep 15, 11:46 am, abhinav gupta wrote: > Shut up...its 3,, > > > > On Thu, Sep 15, 2011 at 9:43 AM, Don wrote: > > It might be 3, but it doesn't have to be 3. > > Don > > > On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN wrote: >

Re: [algogeeks] Re: Math Puzzle

2011-09-15 Thread Piyush Grover
Don is right if R = 0, P = 1 and Q = -1 then the given expression is UNDEFINED!!! On Thu, Sep 15, 2011 at 10:16 PM, abhinav gupta wrote: > Shut up...its 3,, > > > On Thu, Sep 15, 2011 at 9:43 AM, Don wrote: > >> It might be 3, but it doesn't have to be 3. >> Don >> >> On Sep 14, 11:56 pm,

Re: [algogeeks] Re: Math Puzzle

2011-09-15 Thread abhinav gupta
Shut up...its 3,, On Thu, Sep 15, 2011 at 9:43 AM, Don wrote: > It might be 3, but it doesn't have to be 3. > Don > > On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN wrote: > > if P+Q+R= 0 then P2 /QR + Q2/PR + R2/PQ = ?? > > > > how to solve this?? > > -- > You received this message because you are

[algogeeks] Re: Math Puzzle

2011-09-15 Thread Don
It might be 3, but it doesn't have to be 3. Don On Sep 14, 11:56 pm, NAGARAJAN SIVARAMAN wrote: > if P+Q+R= 0  then P2 /QR  + Q2/PR + R2/PQ = ?? > > how to solve this?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group,

[algogeeks] Microsoft coming to PEC on 19th, any specific pattern for written test

2011-09-15 Thread ankurmittal
Hello Guys, We have got news that Microsoft would be conducting just the written test on our campus ( PEC, Chandigarh) on September 19.. I have gone through all the discussion on this forum and haven't seen a thread where only such type of test has been discussed. According to the company only 1

[algogeeks] Re: no of elements of the array

2011-09-15 Thread Don
Not really. Usually you would need a second parameter indicating the size of the input. In theory it might be possible to put a marker value at the end of the array. Most implementations of malloc store the size of the memory block in the word immediately before the returned address. This is used

[algogeeks] no of elements of the array

2011-09-15 Thread rahul vatsa
if i pass an int array to a function, is it possible to find out the no of elements in the called function ? -- 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

Re: [algogeeks]

2011-09-15 Thread saurabh singh
Well actually sh means *The bourne shell.*Since the bourne shell is replaced by bash nowdays ubuntu(I am not sure but the debian OS too)have replaced sh as a command line interpreter(*i.e it is not bourne shell)*. On Thu, Sep 15, 2011 at 11:29 AM, Amol Sharma wrote: > @saurabh..problem again

Re: [algogeeks] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread Nikhil Kumar
@vivek : If you opt for testing , you can always become a developer.It won't go hard on you. And I don't really know about consultant, you have to ask some guy in the force. On Thu, Sep 15, 2011 at 5:15 AM, sukran dhawan wrote: > Just opt fot testing ... If there is a slot for development in the

Re: [algogeeks] Find the element in Array

2011-09-15 Thread Yogesh Yadav
*//this method can be applied only when the value of elements in array are not very large int count[]; for(i = 0 to n-1) { if(count[arr[i]] == 1) printf(" %d ", arr[i]); else count[arr[i]]++; }* .. On Wed, Aug 31, 2011 at 12:38 PM, Yuchen Liao wrote: > Hi Akshat, > >

[algogeeks] ASP connection prblm

2011-09-15 Thread himanshu kansal
if i use the connection string. sConn= "Provider=SQLOLEDB;Integrated Security=SSPI;Trusted_Connection=yes;Initial Catalog=master;Connect Timeout=0;Data Source=VIVEK-PC" then i am able to connect to master database in sql server 2008.. but if i use the connection string sConn= "Provider=SQ

Re: [algogeeks] Re: MICROSOFT WRITTEN IN VASAVI

2011-09-15 Thread Dheeraj Sharma
char str[10]; int length,count; void fun(int x) { if(x==length) printf("%d %s\n",++count,str); else { fun(x+1); str[x]-=32; fun(x+1); str[x]+=32; } } int main() { scanf("%s",str); length=strlen(str); fun(0); getch(); }

Re: [algogeeks] C++ Query...

2011-09-15 Thread teja bala
@ BHARATH exactly very thx On Thu, Sep 15, 2011 at 5:22 PM, bharatkumar bagana < bagana.bharatku...@gmail.com> wrote: > @teja : r u looking for something like this... > #include > #include > class Hai > { > public : > int* getPointerToPrivate() > { > return &i; >

Re: [algogeeks] Re: Microsoft Question

2011-09-15 Thread Yogesh Yadav
For Stack: just make a structure: struct stack_with_priorityqueue { int num; int priority; struct stack_with_priorityqueue *ptr; } now when we add another number just increase the priority... priority++ For Queue: do same...just decrease priority...priority-- ...

Re: [algogeeks] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread sukran dhawan
Just opt fot testing ... If there is a slot for development in the company they will look for the guys in testing first b4 actually going for outside ppl And u can easily shift from testing to development if u perform well On Thu, Sep 15, 2011 at 10:57 AM, rahul sharma wrote: > hey guys plz tel

Re: [algogeeks] C++ Query...

2011-09-15 Thread bharatkumar bagana
@teja : r u looking for something like this... #include #include class Hai { public : int* getPointerToPrivate() { return &i; } void setI(int j) { i=j; } private: int i; }; main() { Hai h; h.setI(10); int *i=h.getPointerToPrivate(); printf("%d",

Re: [algogeeks]

2011-09-15 Thread Siddhartha Banerjee
sort all elements :nlogn If the last 2 arrays are B and C, then sort elements of the form (bi+cj):O(n^2) time O(n^2) space [for the above step, smallest element in b1+c1,next element is smaller of (b1+c2) and(c1+b2), increase pointer accordingly. If at one step, the element under consideration i

Re: [algogeeks] plzzzzzzzz heeeppppp!!!!!!!!!!1

2011-09-15 Thread bharatkumar bagana
+1 prem On Thu, Sep 15, 2011 at 2:54 AM, Prem Krishna Chettri wrote: > Its an open ended question for the New Guys.. > So.. here its some analysis.. >If its project is R&D with high profile org like Amazon.. Google.. SDET > is Developer in Test (Framework Developer for TESTING) but QA is a

Re: [algogeeks] A logical Question

2011-09-15 Thread hary rathor
no increase or no decrease -- 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 option

[algogeeks] C++ Query...

2011-09-15 Thread teja bala
How to access class private data members with a pointer? thx in advance? -- 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 algogeek

Re: [algogeeks] A logical Question

2011-09-15 Thread Siddhartha Banerjee
it will decrease... initially suitcase was removing water equal to its weight, now it displaces water eual to its volume... as density of suitcase is more than that of water (assumption) so the water level decreases... -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] A logical Question

2011-09-15 Thread siddharth srivastava
On 15 September 2011 12:58, Tamanna Afroze wrote: > > *If you are on a boat and you throw out a suitcase, Will the level of > water increase.* No, (if boat is in water and suitcase is thrown in water) No (if boat is in water and you throw out suitcase on land/bank) Yes (if you, boat and suitcas

Re: [algogeeks] Can we define a bijective function from set(strings) ------> Q?

2011-09-15 Thread bharatkumar bagana
@Anil : is there any reason in taking 31 in function pow(31,x) ?. On Wed, Sep 14, 2011 at 10:31 AM, AnilKumar B wrote: > Hi, > > Can we define a bijective function from set(strings) --> Q? > > I thought of using a polynomial function, for example: > > > f(ANIL)=pow(31,0)*ASCII(L)+pow(31,

Re: [algogeeks] A logical Question

2011-09-15 Thread Pradip Singh
it will be same bcz the suitcase was already with him. On Thu, Sep 15, 2011 at 1:32 AM, UTKARSH SRIVASTAV wrote: > hi it;s a physics question of t bouyant force > > > On Thu, Sep 15, 2011 at 1:53 PM, sagar pareek wrote: > >> it depends that weather boat is on the water or not :P >>

Re: [algogeeks] A logical Question

2011-09-15 Thread UTKARSH SRIVASTAV
hi it;s a physics question of t bouyant force On Thu, Sep 15, 2011 at 1:53 PM, sagar pareek wrote: > it depends that weather boat is on the water or not :P > > > On Thu, Sep 15, 2011 at 12:58 PM, Tamanna Afroze wrote: > >> >> *If you are on a boat and you throw out a suitcase, Will

Re: [algogeeks] A logical Question

2011-09-15 Thread sagar pareek
it depends that weather boat is on the water or not :P On Thu, Sep 15, 2011 at 12:58 PM, Tamanna Afroze wrote: > > *If you are on a boat and you throw out a suitcase, Will the level of > water increase.* > > -- > You received this message because you are subscribed to the Google Groups > "Algorit

[algogeeks] A logical Question

2011-09-15 Thread Tamanna Afroze
*If you are on a boat and you throw out a suitcase, Will the level of water increase.* -- 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

Re: [algogeeks] Math Puzzle

2011-09-15 Thread abhinav gupta
Above expression will be (p^3+q^3+r^3)/pqr if a+b+c=0, then a^3+b^3+c^3 = 3abc so, 3pqr/pqr=3 On Thu, Sep 15, 2011 at 10:59 AM, rahul sharma wrote: > hw? > > > On Thu, Sep 15, 2011 at 10:57 AM, Tamanna Afroze wrote: > >> yah the ans is 3 >> >> -- >> You received this message because you ar