[algogeeks] Tally Solutions Review

2011-09-28 Thread Chunky Garg
Can anyone tell me about tally solutions pvt ltd. how is the company and growth in it.. what all is asked in interviews.. -- Regards Chunky Garg -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@

Re: [algogeeks] ARRAY PROBLEM

2011-09-28 Thread Shravan Kumar
O/P should be 00111010 and sub array is exclusive of start index, inclusive of end index. Nice solution On Thu, Sep 29, 2011 at 11:58 AM, UTKARSH SRIVASTAV wrote: > @Amol +1 > > On Thu, Sep 29, 2011 at 11:52 AM, Amol Sharma wrote: > >> given array- >> 1 0 0 1 1 1 0 1 0 1 >> for our co

Re: [algogeeks] ARRAY PROBLEM

2011-09-28 Thread UTKARSH SRIVASTAV
@Amol +1 On Thu, Sep 29, 2011 at 11:52 AM, Amol Sharma wrote: > given array- > 1 0 0 1 1 1 0 1 0 1 > for our convenience lets replace 0 by -1 > array becomes > 1 -1 -1 1 1 1 -1 1 -1 1 > > take another array count which which represents the sum till that index > sum array becomes > 1

Re: [algogeeks] ARRAY PROBLEM

2011-09-28 Thread Amol Sharma
complexity O(n) extra space O(n) -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Thu, Sep 29, 2011 at 11

Re: [algogeeks] ARRAY PROBLEM

2011-09-28 Thread Amol Sharma
given array- 1 0 0 1 1 1 0 1 0 1 for our convenience lets replace 0 by -1 array becomes 1 -1 -1 1 1 1 -1 1 -1 1 take another array count which which represents the sum till that index sum array becomes 1 0 -1 0 1 2 1 2 1 2 //count array now make an important

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread anubhav gupta
http://ideone.com/tJPjL On Thu, Sep 29, 2011 at 10:11 AM, saurabh singh wrote: > http://www.ideone.com/tY7jM > > On Wed, Sep 28, 2011 at 8:13 PM, sreeprasad.sp wrote: > >> >> >> public class firstNonRepeatedCharInString { >> >> public static void main(String abc[]){ >> >> firstNonRepeat

Re: [algogeeks] Re: Yahoo

2011-09-28 Thread prasanth n
c++ and java ll be given more preference On Mon, Sep 26, 2011 at 5:59 PM, abhishek wrote: > c,c++ ,java > > On Sep 26, 4:15 pm, Akash Mukherjee wrote: > > any language pref?? are bash solns acceptable?? > > > > > > > > > > > > > > > > On Mon, Sep 26, 2011 at 12:04 PM, abhishek > wrote: > > > >

[algogeeks] ARRAY PROBLEM

2011-09-28 Thread kartik sachan
Given a binary array ( array containing only 0s and 1s ). You have to print the sub-array with maximum number of equal 1s and 0s. INPUT OUTPUT 1001110101 0011101 complex-O(n) -- *WITH REGARDS,* *

Re: [algogeeks] Re: symantec

2011-09-28 Thread swetha rahul
@ Rashmi thanks a lot On Thu, Sep 29, 2011 at 8:49 AM, siva viknesh wrote: > @rashmi .thanks of lot for sharing.It would be of great > help if u detail much about written test pattern and share the > questions whatever u remember...thanks in advance.. > > On Sep 29, 6:40 am, sush5

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread saurabh singh
http://www.ideone.com/tY7jM On Wed, Sep 28, 2011 at 8:13 PM, sreeprasad.sp wrote: > > > public class firstNonRepeatedCharInString { > > public static void main(String abc[]){ > > firstNonRepeatedCharInString f = new firstNonRepeatedCharInString(); > String checkString="bbzbccdede"; >

Re: [algogeeks] doubt???

2011-09-28 Thread Balaji
Shreyas solution would work. semaphores can be released for a thread that has not acquired it . Thanks, Balaji On Wed, Sep 28, 2011 at 7:41 PM, anshu mishra wrote: > You cant do. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To p

[algogeeks] Re: symantec

2011-09-28 Thread siva viknesh
@rashmi .thanks of lot for sharing.It would be of great help if u detail much about written test pattern and share the questions whatever u remember...thanks in advance.. On Sep 29, 6:40 am, sush57 wrote: > didsymanteccome to your col...how many did they shortlist in first > round

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread sreeprasad.sp
public class firstNonRepeatedCharInString { public static void main(String abc[]){ firstNonRepeatedCharInString f = new firstNonRepeatedCharInString(); String checkString="bbzbccdede"; String checkString1="bzzccde"; String checkString2="abcdef"; Stri

Re: [algogeeks] doubt???

2011-09-28 Thread Shreyas VA
Use 2 semaphores. pseudo code sem_1(1); sem_2(0); THREAD A;THREAD B sem_1_wait(); sem_2_wait(); ... sem_2_signal();

Re: [algogeeks] doubt???

2011-09-28 Thread anshu mishra
You cant do. -- 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 this

[algogeeks] Re: symantec

2011-09-28 Thread sush57
did symantec come to your col...how many did they shortlist in first rounds...can u say pattern of written test... On Sep 28, 11:30 pm, rashmi i wrote: > they have a package of around 5.8 in hand. they have a written test followed > by 2-3 interviews.The written test questions belonged to previou

[algogeeks] doubt???

2011-09-28 Thread htross
There are two threads, one produces even number and other produces odd number, how will you print the consecutive numbers. -- 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 uns

Re: [algogeeks] indus valley partner doubt

2011-09-28 Thread Nitin
I dnt know much but one of my frend got selected and they have taken 8 rounds of interviews in a joint placements of ip univ... On Wed, Sep 28, 2011 at 5:40 PM, ravi maggon wrote: > Hey can anyone tell me about the procedure and questions of Indus Valley > Partners?? > > -- > Regards > Ravi Magg

[algogeeks] Re: What is the complexity of this program?

2011-09-28 Thread Dave
@Avenged: I think it is O(n^2), where n = strlen(str). This is because strlen(str) itself is O(n), as it must search the string character by character looking for the null character. Furthermore, I think that the compiler probably cannot optimize strlen(str) out of the for loop, so it is executed n

[algogeeks] What is the complexity of this program?

2011-09-28 Thread Avenged
Please tell me the *time* and *space* complexity of this program? I believe it should be : O(*n*) and O(*1*) respectively. #include #include #define SET_BIT(x,k) (x|=(1<<(k))) #define CHECK_BIT(x,k) (x&(1<<(k))) int main() { unsigned int i,ascii; int count1=0,count2=0; const char* s

Re: [algogeeks] symantec

2011-09-28 Thread rashmi i
they have a package of around 5.8 in hand. they have a written test followed by 2-3 interviews.The written test questions belonged to previous years GATE questions. The interviews were easier and the questions ranged from OS, OOP concepts, Java, Databases. On Wed, Sep 28, 2011 at 12:09 AM, swetha

[algogeeks] programming challenge

2011-09-28 Thread rashmi i
1. Datacenter Cooling We have some rooms in our datacenter, and we need to connect them all with a single cooling duct. Here are the rules: - The datacenter is represented by a 2D grid. - Rooms we own are represented by a 0. - Rooms we do not own are represented by a 1. - The duct ha

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread Geek-0
But again this uses 25 integer variables (array) , what were you suggesting about setting bits for checking repeatedness?? i mean there are 256 ascii characters so that means i shall use 8 integer variables (8*4*8=256 bits) right ? if am correct then could you explain what to do next? -- You

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread sukran dhawan
its not d same .check properly :) On Wed, Sep 28, 2011 at 9:56 PM, Avenged wrote: > It's the same code which was posted earlier. Could you explain how to > implement using bitset? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To v

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread Avenged
It's the same code which was posted earlier. Could you explain how to implement using bitset? -- 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/-/_X21NZy9kZkJ.

Re: [algogeeks] yahoo qn

2011-09-28 Thread Yogesh Yadav
Count number of space... Add 1 in it... that will be the no of words (say x)... now take two variables m & n m=x/2 n =2 //if m is odd =3 //if m is even now store the values in array a[] as a[0]=m a[1]=(m+n)mod(x) a[2]=(m+n)mod(x) . . a

Re: [algogeeks] Sapient Help!!

2011-09-28 Thread Akanksha .
wrk culture is gud mostly.. if u want to do gud technical wrk den avoid dis company otherwise if u r interested in management or nething like dat den u can go for it.. On Wed, Sep 28, 2011 at 8:15 PM, rohit wrote: > Is anybody know about sapient working culture? > > -- > You received this message

Re: [algogeeks] yahoo qn

2011-09-28 Thread Akash Mukherjee
i am trying implement it by d shuffling of an array using random. On Wed, Sep 28, 2011 at 8:39 PM, Shravan Kumar wrote: > How about using the order of words a key? 41325 is the key in you i/p . But > this is so trivial, what we can do further is by encrypting this number > > On Wed, Sep 28,

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread sukran dhawan
sorry :D int RepChar(char *str) { int i,j; int ret = -1; int count[25]; for (i=0;i<25;++i) { count[i]=0; } for (i=0;str[i];++i) { j=str[i] - 'a'; count[j]++; } for (i=0;str[i];i++) { if (count[i]==1) { return ('a'+i);

Re: [algogeeks] yahoo qn

2011-09-28 Thread Shravan Kumar
How about using the order of words a key? 41325 is the key in you i/p . But this is so trivial, what we can do further is by encrypting this number On Wed, Sep 28, 2011 at 8:16 PM, Akash Mukherjee wrote: > hi dis is a qn posted in this grp itself > > Q3) Input -> India is a great country. Key(al

[algogeeks] yahoo qn

2011-09-28 Thread Akash Mukherjee
hi dis is a qn posted in this grp itself Q3) Input -> India is a great country. Key(alphanumeric) - B2. You have to encrypt the given sentence, in such a way that only the words should be jumbled. Output -> great India a is country. While decrypting it, you have to use the same alpha numeric key a

[algogeeks] Sapient Help!!

2011-09-28 Thread rohit
Is anybody know about sapient working culture? -- 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.

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread Shravan Kumar
@Sukran I guess it will return repeating character in alphabetical order but not in order of appearance in the i/p ?? On Wed, Sep 28, 2011 at 8:04 PM, sukran dhawan wrote: > int RepChar(char *str) > { > int i,j; > int ret = -1; > int count[25]; > > for (i=0;i<25;++i) { >

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread sukran dhawan
int RepChar(char *str) { int i,j; int ret = -1; int count[25]; for (i=0;i<25;++i) { count[i]=0; } for (i=0;str[i];++i) { j=str[i] - 'a'; count[j]++; } for (i=0;i<25;i++) { if (count[i]==1) { return ('a'+i); } }

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread shady
i will mail the code by tomorrow. On Wed, Sep 28, 2011 at 6:54 PM, Avenged wrote: > Bump. Anybody? > > -- > 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/

Re: [algogeeks] dbms

2011-09-28 Thread Akash Mukherjee
ty:) On Wed, Sep 28, 2011 at 3:50 PM, sharmila saru wrote: > Raguramakrishan > > On Fri, Sep 23, 2011 at 1:09 PM, Akash Mukherjee wrote: > >> hican ne1 suggest good books for dbms...not theory types but more of a >> question bank like maybe a cracking the coding interview is for >> coding/alg

Re: [algogeeks] Find lowest common ancestor of Binary Tree

2011-09-28 Thread amrit harry
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=lowestCommonAncestor chk it out.. On Wed, Sep 28, 2011 at 11:04 AM, sukran dhawan wrote: > it has already been discussed .. search in the archives > > On Wed, Sep 28, 2011 at 10:57 AM, Ankuj Gupta wrote: > >> Find lowest common ances

Re: [algogeeks] First non-repeated character complexity?

2011-09-28 Thread Avenged
Bump. Anybody? -- 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/-/on-DbSKUdzsJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe

[algogeeks] Adobe Written Test - 25 SEPT 2010

2011-09-28 Thread VIHARRI
1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed on

Re: [algogeeks] Re: without using '-'

2011-09-28 Thread Amol Sharma
@kunal +1 -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Tue, Sep 27, 2011 at 2:51 PM, rajan wrote: >

[algogeeks] indus valley partner doubt

2011-09-28 Thread ravi maggon
Hey can anyone tell me about the procedure and questions of Indus Valley Partners?? -- Regards Ravi Maggon B.E. CSE, Final Year Thapar University www.algorithmguru.com "*Failure is the opportunity to begin again more intelligently"* -- You received this message because you are subscribed to t

Re: [algogeeks] MS Question -> Median of a BST without using extra space and in O(n)

2011-09-28 Thread praneethn
convert bst to doubly linked list inorder and find middle element using slow and fast pointer concept On Tue, Sep 27, 2011 at 2:18 PM, Ankur Garg wrote: > I was thinking of making the tree balanced with equal no of nodes in left > and right subtree > > Median will be root in this case >

Re: [algogeeks] Amazon Ques

2011-09-28 Thread KARTHIKEYAN V.B.
reversing the linked list static void reverse(struct node** head_ref) { struct node* p=NULL; struct node* curr=*head_ref; struct node* q; while(curr!=NULL) { q=curr->next; curr->next=p; p=curr; curr=q; } *head_ref=p; } -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] ADOBE

2011-09-28 Thread rahul sharma
developer or tester...wats packageif 6-8 then testing ig>10 then developerquestions vary from profyl ton profyl On Wed, Sep 28, 2011 at 3:22 PM, DIVIJ WADHAWAN wrote: > We belong to IT so they would be taking programmers , I don't know anything > formally yet. Just know its coming !!

Re: [algogeeks] help help

2011-09-28 Thread abhishek iyer
http://www.fileserve.com/file/eBgSThF/How%20To%20Prepare%20For%20Qt%20Apt%20For%20Cat%202E%20By%20Sharma.pdf On Tue, Sep 27, 2011 at 4:23 AM, SHUBHAM BANSAL wrote: > If anyone have E-book of "Quantative Aptitude For CAT by Arun Sharma".?? > Then kindly send to my email.or send me link if any 1 h

Re: [algogeeks] dbms

2011-09-28 Thread sharmila saru
Raguramakrishan On Fri, Sep 23, 2011 at 1:09 PM, Akash Mukherjee wrote: > hican ne1 suggest good books for dbms...not theory types but more of a > question bank like maybe a cracking the coding interview is for > coding/algo... > > thanx :) > > -- > You received this message because you are

Re: [algogeeks] ADOBE

2011-09-28 Thread DIVIJ WADHAWAN
We belong to IT so they would be taking programmers , I don't know anything formally yet. Just know its coming !! On Wed, Sep 28, 2011 at 3:19 PM, siddharth srivastava wrote: > > > On 28 September 2011 15:10, DIVIJ WADHAWAN wrote: > >> IIIT-Delhi > > > profile ? > > >> >> >> On Wed, Sep 28, 2011

Re: [algogeeks] ADOBE

2011-09-28 Thread siddharth srivastava
On 28 September 2011 15:10, DIVIJ WADHAWAN wrote: > IIIT-Delhi profile ? > > > On Wed, Sep 28, 2011 at 3:03 PM, sukran dhawan wrote: > >> which coll ? >> >> On Wed, Sep 28, 2011 at 2:49 PM, DIVIJ WADHAWAN wrote: >> >>> Adobe is coming to my college in mid October. >>> Can someone tell me what

Re: [algogeeks] ADOBE

2011-09-28 Thread DIVIJ WADHAWAN
IIIT-Delhi On Wed, Sep 28, 2011 at 3:03 PM, sukran dhawan wrote: > which coll ? > > On Wed, Sep 28, 2011 at 2:49 PM, DIVIJ WADHAWAN wrote: > >> Adobe is coming to my college in mid October. >> Can someone tell me what kind of questions do they ask, number and types >> of rounds etc ?? >> >> -- >>

Re: [algogeeks] ADOBE

2011-09-28 Thread sukran dhawan
which coll ? On Wed, Sep 28, 2011 at 2:49 PM, DIVIJ WADHAWAN wrote: > Adobe is coming to my college in mid October. > Can someone tell me what kind of questions do they ask, number and types of > rounds etc ?? > > -- > You received this message because you are subscribed to the Google Groups > "

[algogeeks] ADOBE

2011-09-28 Thread DIVIJ WADHAWAN
Adobe is coming to my college in mid October. Can someone tell me what kind of questions do they ask, number and types of rounds etc ?? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroup

Re: [algogeeks] Samsung campus visit

2011-09-28 Thread sukran dhawan
wats the package ? On Tue, Sep 27, 2011 at 9:08 PM, Nitin wrote: > C questions there are 12 -13 questions given on internet it will be same as > it is given in the paper ,i dnt find a link right now otherwise do test ur c > skills thoruoghly all c questions will be from that book > > > On Tu

[algogeeks] thread qs

2011-09-28 Thread deepikaanand
PLz expalin the output of the following program :- #include #include void *thread(void *); int main() { pthread_t t1,t2; char msg1[]="HELLO1"; char msg2[]="HELLO2"; printf("Before create1 \n"); pthread_create(&t1,NULL,thread,(void *)msg1); printf("after create1\n"); printf("before create2\n"); pt

Re: [algogeeks] Re: MS Question -> Median of a BST without using extra space and in O(n)

2011-09-28 Thread anshu mishra
*@all to median of BST time O(n) space O(1) (modified code of nitin to get median) medianBST*(node, n) int x = 0; *while* hasleftchild(node) *do* node = node.left *do* x++; if (x == n/2) return node->val; *if* (hasrightchild(node)) *then* node = node.right *whil