Re: [algogeeks] Adobe written test question

2012-10-25 Thread kumar anurag
in fy2 , the variable arr[10] has not been declared and hence it should display error message while compiling Thanks Kumar Anurag On Wed, Oct 24, 2012 at 11:06 PM, rahul sharma rahul23111...@gmail.comwrote: int arr[10] // in fyl 1 now in fyl 2 extern int *arr void foo() { arr[0]=10; }

Re: [algogeeks] Adobe written test question

2012-10-25 Thread Nishant Pandey
i think arr[10] and int *arr are two different declaration when ,when compiler tried to link with the memory of int arr[10] it could nt find it , as u have declraed it to be integer type pointer , and in file 1 it could find integer pointer . On Wed, Oct 24, 2012 at 11:06 PM, rahul sharma

[algogeeks] Fwd: IVY comptech campus visit

2012-10-25 Thread sachin singh
Can anyone tell about the selection proceedure for IVY comptech? I have heard they have visited NIT Bhopal. Please reply back with the questions that were asked in the written exam, -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to

[algogeeks] Random Number generation

2012-10-25 Thread Anuj Khandelwal
hey all, Any idea to generate random number without using rand() function call ? Any algorithms for random number generation ? -- Anuj Khandelwal Final Year Undergraduate Student Department of Computer Engineering Malaviya National Institute of Technology, Jaipur India +91-9784678325 -- You

Re: [algogeeks] Random Number generation

2012-10-25 Thread bharat b
I heard that LINUX uses our past time mouse movement and keys pressed at time and something else to generate a random number. On Thu, Oct 25, 2012 at 4:07 PM, Anuj Khandelwal anuj.cool.khandel...@gmail.com wrote: hey all, Any idea to generate random number without using rand() function call ?

Re: [algogeeks] Fwd: IVY comptech campus visit

2012-10-25 Thread payal gupta
One coding question : find the third largest no in the given array of elements (20 min) 15 mcqs on java and apti each followed by a tech and hr intervw. @ll d bst..:):) Regards, PAYAL GUPTA, NIT-B. On Thu, Oct 25, 2012 at 2:13 PM, sachin singh sachin...@gmail.com wrote: Can anyone tell about

Re: [algogeeks] Re: Does recusrion creates array or its by address??

2012-10-25 Thread bharat b
as rahul said, pathLen is pass by value, so it is overwriting the old values at index pathLen in path[]. path[] is pass by ref. On Thu, Oct 25, 2012 at 3:04 AM, rahul sharma rahul23111...@gmail.comwrote: I think it is overwritng old values when child end..parent overwrite old value with new..m

[algogeeks] Re: Random Number generation

2012-10-25 Thread Don
Mersenne Twister is more than sufficient for simulation or most other applications other than encryption. Don On Oct 25, 6:37 am, Anuj Khandelwal anuj.cool.khandel...@gmail.com wrote: hey all, Any idea to generate random number without using rand() function call ? Any algorithms for random

Re: [algogeeks] Adobe written test question

2012-10-25 Thread rahul sharma
@all.can u provide me working code for use of extern..whenever i try to use..linker error comes...like any simple codefor use of extern On Thu, Oct 25, 2012 at 9:49 AM, Nishant Pandey nishant.bits.me...@gmail.com wrote: i think arr[10] and int *arr are two different declaration when ,when

Re: [algogeeks] Re: c code help!!!!

2012-10-25 Thread rahul sharma
As per o/p below: 00 00 80 3f 01 00 00 00 44 ff 28 00 01 00 00 00 first byte address is first row. second byte address is second row. third byte address third row and so on but how first row containg 3 values...as 1byte=2hexdigits..si only two digits must be there. and u said 44 ff 28 00 is

Re: [algogeeks] Re: c code help!!!!

2012-10-25 Thread rahul sharma
address of each byte is printed...each byte is 32 bit long...so 32/4=8 hex for each row...but how these are separated with %.2x tin group of 2's%.2x means min. 2 width ..if 2..then leading zeros... so it should be (%.2x,start[i]); start[i] in 2 but it is more so ignored...print

Re: [algogeeks] Re: c code help!!!!

2012-10-25 Thread rahul sharma
Please dont reply to thi post..wrng questionsry for that On Fri, Oct 26, 2012 at 2:31 AM, rahul sharma rahul23111...@gmail.comwrote: address of each byte is printed...each byte is 32 bit long...so 32/4=8 hex for each row...but how these are separated with %.2x tin group of 2's%.2x

[algogeeks] Re: T1, with millions of nodes, and T2, with hundreds of nodes. Create an algorithm to decide if T2 is a subtree of T1.

2012-10-25 Thread Don
If T1 is a balanced tree with 50 million nodes, where the value of each node is 42, and T2 is a tree with 500 nodes with all values equal 42 except the rightmost node which is 43, these approaches will take a very long time. Any ideas on how to improve performance in such cases? Don On Oct 25,

[algogeeks] .Given the binary form of a number in a string. WAP to find 2's complement in that string itself.[ADOBE]

2012-10-25 Thread rahul sharma
Plz give a program for this...thnx -- 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

Re: [algogeeks] Random Number generation

2012-10-25 Thread Saurabh Kumar
Take a look at Linear Congruential Generatorhttp://en.wikipedia.org/wiki/Linear_congruential_generator algorithm for generating pseudo random numbers. On 25 October 2012 16:58, bharat b bagana.bharatku...@gmail.com wrote: I heard that LINUX uses our past time mouse movement and keys pressed at

[algogeeks] Range Checking Efficiently C++

2012-10-25 Thread Atul Singh
Is there a efficient way to check the range of numbers in C++ Suppose if x is to checked in range a and b both exclusive ie if ( x a x b ) Is there any efficient way of doing this. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

[algogeeks] Re: .Given the binary form of a number in a string. WAP to find 2's complement in that string itself.[ADOBE]

2012-10-25 Thread apsalar
Read the string backwards and print the same character till you find a 1. Flip all the preceding bits. E.g - 10 - 10 11 - 01 (LSB 1 is printed same, and the previous bit is flipped) On Thursday, October 25, 2012 6:11:09 PM UTC-4, rahul sharma wrote: Plz give a program for