Re: [algogeeks] Max sum circular array

2012-07-24 Thread hary rathor
we can be use logical window and slide through the array in circular manner. apply kandane's algo on logical window. -- 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 unsubscr

Re: [algogeeks] Question asked in Tachyon interview

2012-06-27 Thread hary rathor
apply BFS -- 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 gro

Re: [algogeeks] Re: MS Question : find word in 2D array

2012-06-12 Thread hary rathor
1 search should in using KMP algo so that It can be seacrh in O(n) . let function is int KMP(src,trget, searchDirection ) this kmpSearch funtion should be implemented is such a fashion that is search in both direction. 3. assume that give 2d array name is array const int row =1; const int col =1

Re: [algogeeks] Re: Power(n^n)

2012-06-11 Thread hary rathor
there would no problem of rang if K^(1/N)==N -- 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] networking

2012-03-22 Thread hary rathor
you can use RMI registry -- 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,

Re: [algogeeks] MYSIS AND DRISHTI-SOFT

2011-12-13 Thread hary rathor
aal puzzle from techinterview. more then 50 % came from there . -- 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

Re: [algogeeks] Detect a loop with just head ptr given

2011-12-08 Thread hary rathor
take two pointer run first with one speed and another with two until they meet, now take a first pointer and assign with head of list . now move again both same speed (only one forward at a time ) now as they meet at point that will be your starting pointer of loop. On 12/8/11, Deepak Nettem wro

Re: [algogeeks] Pattern matching

2011-11-29 Thread hary rathor
specify language . if in c then first write code in lex then compile it after that you will got your c code. if in java then you can use regex class for such code . -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send e

Re: [algogeeks] Algm

2011-11-14 Thread hary rathor
d cause of a b c have complexity o(nlogn) -- 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.

Re: [algogeeks] Counting Diagonals in a Polygon

2011-10-15 Thread hary rathor
sunny : are you in 5th year . i have heard that b-tech is 4 year degree?. -- 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 algogee

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

2011-09-27 Thread hary rathor
@ rajan -ve sign already used inside strcmp 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 this group, send email to algogeeks+unsubscr...@google

Re: [algogeeks] Re: K-LCS

2011-09-19 Thread hary rathor
can anybody tell about other approach because suffix tree is very thought to implement at interview or written test time -- 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 unsub

Re: [algogeeks] is it possible??

2011-09-19 Thread hary rathor
use #pragma in c . static block in java . by the way which lang you are talking about ? -- 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 em

Re: [algogeeks] Networking:suggest some book

2011-09-17 Thread hary rathor
1 frozen 2 steven Vol 1 -- 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,

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

Re: [algogeeks] String

2011-09-12 Thread hary rathor
kapil : in your solution you are required extra O(n+n*sizeOf(int *)) both memory to create a link list that really costly -- 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 unsu

Re: [algogeeks] Longest palindrome

2011-08-21 Thread hary rathor
you can do it in O(n) if you can give extra memory O(n). -- 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...@goo

Re: [algogeeks] Amazon Question

2011-08-18 Thread hary rathor
bitset is best . require only 32 time less then require in hash table . -- 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+

Re: [algogeeks] longest repeated substring

2011-08-18 Thread hary rathor
suffix tree is best -- 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, visi

Re: [algogeeks] reason

2011-08-15 Thread hary rathor
main() { int i=6; do { if(i<5) printf("have fun...","\n"); }while(i--); } now you can evaluate your self. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to a

Re: [algogeeks] how o/p is coming

2011-08-11 Thread hary rathor
print nothing , your output is wrong -- 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] ashutosh kumar wants to chat

2011-08-08 Thread hary rathor
who are u ? -- 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 g

Re: [algogeeks] mcq

2011-08-08 Thread hary rathor
ans can be only c . it can't ans b because of subroutine don't reduce the run time ... cause it calling function require extra push and pop operations. that's why we use inline function. so we can say that ans c is perfact -- You received this message because you are subscribed to the Google Gr

Re: [algogeeks] mcq

2011-08-08 Thread hary rathor
link time -- 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 gro

Re: [algogeeks] Paypal interview Questions

2011-08-06 Thread hary rathor
no c doesn't -- 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

Re: [algogeeks] Paypal interview Questions

2011-08-06 Thread hary rathor
@delip ; have you not got that it require single strict O(n) just single pass you are doing it in O(n^2) -- 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] question

2011-08-06 Thread hary rathor
in a 64 bit computer is that is capable of transfer 64 bit at a time 64 bit os means it capable of handle these 64 bit at time .but 32 it os use only half of bus so "theorytically not practically" 64 bit is 8 time faster than 32 bit os . and 64 bit os can address more ram at time . cause of wide 6

Re: [algogeeks] Re: Duplicates in a string

2011-08-06 Thread hary rathor
than we can make a make bit set for keep track. only require one bit per character. we can track 256 character by just 256/32 =8 integer . i think that is sufficient for c language. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to

Re: [algogeeks] difference between the two

2011-08-05 Thread hary rathor
no ,if u r using 32 bit machine . that will use 4 byte pointer size , but in 64 machine that enforce to be size of 8 . where padding will take int your given first structure so for 32 bit- size will 8 8 for both structure for 64 bit - size will 16 and 12 respectively cause of 4 bit padding in on

Re: [algogeeks] Re: Duplicates in a string

2011-08-05 Thread hary rathor
i have used 26 bit of checker variable then i have checked in "if statemet " that if bit is set there then put then character in jth posion, then set the the bit for character -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this g

Re: [algogeeks] Re: Duplicates in a string

2011-08-05 Thread hary rathor
#include int main () { char str[]="hello world"; int i,j=0,checker=0; for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] Re: Testcases

2011-07-29 Thread hary rathor
oh! sorry : if(c^2 a^2+b^2) obtuse angle -- 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.

Re: [algogeeks] Re: Testcases

2011-07-29 Thread hary rathor
if(c^2 http://groups.google.com/group/algogeeks?hl=en.

Re: Re : [algogeeks] Re: size of self referential structure

2011-07-27 Thread hary rathor
@ sunny ; i am working on 64 bit windows 7 with dev and also in gcc + ubuntu 64 bit ... am using i3 processor that is 64 bit... what should do to get size 8 byte ? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send

Re: Re : [algogeeks] Re: size of self referential structure

2011-07-27 Thread hary rathor
@sunny : what you means by machine dependent means 64 bit: you means by compiler / operating system /computer architecture ? because i never get size of pointer 8 byte. if your statement true then tell me which compiler / operating system /computer architecture i should have get this output 8. -

Re: [algogeeks] Patterns in a String

2011-07-25 Thread hary rathor
Boyer–Moore string search algorithmfor fastest search ever introduced -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@goo

Re: [algogeeks] Nagarro Coding Round Ques......

2011-07-24 Thread hary rathor
x^=(1<<(str[i]-97)); what is purpose of above statement -- 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...@goo

Re: [algogeeks] atoi()

2011-07-23 Thread hary rathor
int number=0; read linearly if(ch=='-'||ch=='+') number=-1; ch=str[i]; chack every char is if(ch>'0'&&ch<'9') then number =number *10+ch-'0'; -- 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] MS Written Test

2011-07-23 Thread hary rathor
no aditional data structure is required , if we search in directly on input stream. by using Boyer-Moore string search algorithm. it take Ω(n/m) or O(n). so we do it on the fly. Hash function has also some prolem in where ta

Re: [algogeeks] Re: Find valid anagrams

2011-07-20 Thread hary rathor
calculate hash value of word then compare with hash value of source string -- 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 algoge

Re: [algogeeks] How to design Elevator Control system ?

2011-07-19 Thread hary rathor
disk scheduling algorithms -- 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 optio

Re: [algogeeks] Microsoft Interview Qn - Looping

2011-07-19 Thread hary rathor
n ; ~n -- 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 group

Re: [algogeeks] Fwd: MICROSOFT INTERNSHIP (Coding round)

2011-07-19 Thread hary rathor
assume number is to found is n this O(logn) solution solution 2: 1 apply binary search on diagonal which return position (which element is just greater then n) let supose return i; 2 int j1=binary(arr,i,N-1); // search in above row if(j1!=-1) {printf("%d ,%d",i,j1);} int j2

Re: [algogeeks] Long string and the first non-repeating character

2011-07-18 Thread hary rathor
can we use bit vector ? because by do it we need just 32 bits of one extra variable . -- 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 emai

Re: [algogeeks] VIRTUAL INHERITANCE

2011-07-18 Thread hary rathor
by using "friend " ? -- 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, vis

Re: [algogeeks] Long string and the first non-repeating character

2011-07-18 Thread hary rathor
can anybody tell me in O(n) solution,? -- 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] Counting the ways.

2011-07-17 Thread hary rathor
is THIS like N queen 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 more

Re: [algogeeks] MS Ques

2011-07-17 Thread hary rathor
sorry 7*9=63 put 3 in list 3 -- 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 opt

Re: [algogeeks] MS Ques

2011-07-17 Thread hary rathor
int means 1->5->6->7 2->7->9 means you will multiply 7*9 result 9 insert in 3rd list so start from end of list not from start now do you under stand -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email

Re: [algogeeks] MS Ques

2011-07-17 Thread hary rathor
aditi : problem your code 1 .you are not putting single digit in third list but whole multiplication of two digit 2. forward add carry to next result ; 3. keep mind that list size may not be equal 4. list is singly so start processing from right side you need reverse them -- You received this me

Re: [algogeeks] Re: MICROSOFT

2011-07-17 Thread hary rathor
int dividend,divisor,remainder; int division(int p,int q){ int quotient=1; /*if divisor and diviend are equal then quotient=1*/ if(p==q){ remainder=0; return 1; } /*if dividend is smaller than divisor then remainder=dividend*/ if(p dividend*/ while(p>=q){ q<<=1; quotient<<=1; } /*shift right for on

Re: [algogeeks] Re: MICROSOFT

2011-07-17 Thread hary rathor
sorry: i didn't see -- 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, visi

Re: [algogeeks] Re: MICROSOFT

2011-07-17 Thread hary rathor
assume that ; all element in array are short integer; int i; long long long long long int multi=1; for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] Re: Reversing the order of words in String

2011-07-13 Thread hary rathor
swap(char **a,char **b) { char *t=*a; *a=*b; *b=t; } #define wd 3 int main() { char *r[wd]; char *str="ram is good"; //splite requiere O(n) where n is number of charecter int i=0; int k=0; while(str[i]!='\0') { char arr[10],j=0; while(str[i]!=' '||str[i]!

Re: [algogeeks] Re: questions related to C

2011-07-12 Thread hary rathor
#define SWAP(f,type) f(type x, type y)\ {\ type z; z=x, x=y,y=z; \ } swap(M_INT, int) swap(M_FLT,float) swap(m_double,double) int main() { int p =5,q=4; float r=5.4,s=6.9; double v=6.5,w=6.9; swap(p,q); swap(r,s); swap(v,w); } -- You received this message because you are subscribed to the Go

Re: [algogeeks] Re: sbtration

2011-07-12 Thread hary rathor
how it can done without using any arithmetic operation ? -- 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...@goo

Re: [algogeeks] Re: given a bst and a value x.find pair of nodes in the tree that sum upto x

2011-07-01 Thread hary rathor
struct bst * BSTsearch(struct bst ** MAIN_ROOT,key) { if ( MAIN_ROOT==NULL ) return NULL; if(MAIN_ROOT->data==key) return MAIN_ROOT;

Re: [algogeeks] Re: meaning of null in output

2011-07-01 Thread hary rathor
Rajeev : please can u explain by a c example ? -- 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] Re: 2 D array(dynamic allocation)

2011-07-01 Thread hary rathor
@saurabh : i think u didn't see that you are calling malloc 3 times withing one loop -- 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] Re: Amazon - Longest palindrome in a string in O(n)

2011-07-01 Thread hary rathor
@Dumanshu; worst case O(n3) hai iska -- 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] null macro

2011-07-01 Thread hary rathor
refer to "pointer in c chapter 1" for better explanation -- 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...@go

[algogeeks] c output:

2011-06-30 Thread hary rathor
program 1; output :1 int main() { int i; i= 1,2,3; printf("i:%d\n",i); return 0; } program 2; output: ERROR int main() { int i=1,2,3; printf("i:%d\n",i); return 0; } pls explain -- You received this message because

Re: [algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-30 Thread hary rathor
can we not use count sort because of O(n) .? -- 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.co

Re: [algogeeks] Reverse

2011-06-30 Thread hary rathor
@ juver++ : that i have already done. -- 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

Re: [algogeeks] Reverse

2011-06-30 Thread hary rathor
guy can anybody reverse without taking 0 extra variables ? -- 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...

Re: [algogeeks] 2 D array(dynamic allocation)

2011-06-29 Thread hary rathor
#include int main () { int *mat; int i,j; int ROW=4; int COL=3; int k=0; mat=(int *)malloc(ROW*COL*sizeof(int)); for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] Anyone have "The google resume book"

2011-06-27 Thread hary rathor
very funny ! every one know this site swathi -- 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.co

[algogeeks] c/c++ : STREAM PROBLEM

2011-06-27 Thread hary rathor
if i am design algo which specify to not use the extra memory then if i use the streams . then is it consider as a extra memory? -- Harish Pranami Master Of Computer Application , Deptt of computer Science, north campus , university of delhi, New Delhi pin no - 110007 -- You received this mes

Re: [algogeeks] Reverse

2011-06-27 Thread hary rathor
this solution according to sameer statement solution if there is any problem then pls tell me . here string or char is not being store anywhere char * reverse(char *str,int i ,int j) { while(ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] Reverse

2011-06-27 Thread hary rathor
@vishal : dont you think that , i is also a variable? -- 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...@google

Re: [algogeeks] Re: puzzle

2011-06-26 Thread hary rathor
5 mice: result time complete bottle to mice1: 14 hour after 2.5 hour to mice2 : 16.5 hour after 2.5 hour to mice3 : 19 hour after 2.5 hour to mice4 : 21.5 hour after 2.5 hour to mice5 : 24 hour one of

Re: [algogeeks] char *arr and char arr[]

2011-06-25 Thread hary rathor
sol 1 : #include using namespace std; int main(){ char arr[]="Pilani",*p=arr; p[0]='K';// does not work. *(&p[0])='s'; //does not work; cout< using namespace std; int main(){ char *p=(char *)"Pilani"; p[0]='K';// does not work. *(&p[0])='s'; //does not work; cout

Re: [algogeeks] SET IN C

2011-06-24 Thread hary rathor
@ pecific : can you explain in more detail? -- 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

Re: [algogeeks] Re: c code help

2011-06-24 Thread hary rathor
[] has higher precedence then ( - ) operator thereby it take element first and make it to negative -- 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

Re: [algogeeks] Re: Sherlock puzzle 24 June

2011-06-24 Thread hary rathor
cause of smothering ... -- 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,

[algogeeks] SET IN C

2011-06-24 Thread hary rathor
Can anyone suggest me how to implement a set in c . It means that it should take O(1) in insertion, deletion , finding element -- Harish Pranami Master Of Computer Application , Deptt of computer Science, north campus , university of delhi, New Delhi pin no - 110007 -- You received thi

Re: [algogeeks] C Error

2011-06-24 Thread hary rathor
actually ?: operation have more precedence then = so it evaluate first ,to 10 in next pass it become 10=10 ; which is illegal cause of (=) operator required a variable left side but is present hence error cause lvalue required . -- You received this message because you are subscribed to the Goo

Re: [algogeeks] MS Question

2011-06-23 Thread hary rathor
1 :take directly word by word direct from input stream 2: just reverse word and put them into out stream Note : out stream can send data either on console or file this is require temp string sizeof (> length of largest word) that you calculate On 6/24/11, Ashish Goel wrote: > given str

Re: [algogeeks] finding vlaue of nCr

2011-06-21 Thread hary rathor
nCr=(n-1)Cr+(n-1)C(r-1) -- 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,

Re: [algogeeks] BST

2011-06-18 Thread hary rathor
then you can use iterative method instead of recursion ... -- 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...@

Re: [algogeeks] Re: remove duplicate chars in a string without using extra memory

2011-06-12 Thread hary rathor
@ rohit : Do you not think that heapchr array is not taking any memory as question specification ? -- 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

Re: [algogeeks] Print 1 to n without loops

2011-06-11 Thread hary rathor
int main() { static int i=1; int n=100; if(i<=n) { printf("%d ",i); i++; main(); } return 0; } -- 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, se

Re: [algogeeks] need help in Desktop applications

2011-06-09 Thread hary rathor
just take glance at book java swing of o'reilly book you will your all 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 alg

Re: [algogeeks] Re: MS Interview

2011-06-09 Thread hary rathor
dumnanshu you should first mention memory size in your computer so that i could know that how many number i can have in main memory at time -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googl

Re: [algogeeks] Re: Odd Even Sort array

2011-06-08 Thread hary rathor
here DP is more effective -- 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

Re: [algogeeks] c++ output

2011-06-08 Thread hary rathor
because compiler have know about g funtion while evaluating f -- 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..

Re: [algogeeks] Microsoft ques : reverse of dutch national flag problem

2011-06-06 Thread hary rathor
char str[]="abcdABCD1234"; int i,len=strlen(str)-1; int j=0,l=0; printf("%s",str); printf("\n"); for(i=0;i<=len;i++) { printf("%c",str[j]); j=j+4; if(j>len)j=++l; } it prtint your desired result , -

Re: [algogeeks] Microsoft ques : reverse of dutch national flag problem

2011-06-05 Thread hary rathor
it it is possible in order of O(n ) -- 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] C doubt

2011-06-05 Thread hary rathor
are bhai just you use "memcpy" function in you need worry about any ... is it sufficient ? -- 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, sen

Re: [algogeeks] MS Iv Question

2011-06-04 Thread hary rathor
the area points , boundary on which circle need to display and radius should not be negative -- 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, s

Re: [algogeeks] MS question

2011-06-04 Thread hary rathor
" [ ] meas addtion " is addition is base address so 3 +"Ya!Hello! how is this? %s\n" become "Hello! how is this? %s\n" cause of add 3 in base address in followed string ; this result as format specifier in printf funcution ; same as for second perameter ; 5+"junk/super" become "super" string

Re: [algogeeks] box packing

2011-06-04 Thread hary rathor
then u can use radix sort ... -- 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 opt

Re: [algogeeks] remove duplicate chars in a string without using extra memory

2011-06-03 Thread hary rathor
Akash your code is good but it can be code more short #include int main() { unsigned long long int a = 0; char str[]="harish chandra pran"; int i, j; for ( i = j = 0; str[i]; i++ ) { int offset=0; if ( str[i] >= 'a' && str[i] <= 'z' ) offset=26; offse

Re: [algogeeks] Re: c output

2011-06-03 Thread hary rathor
in 1st pass both ++b ++b= 4 then ++b= 5; at second pass a= 5*5; because ++b is 5 -- 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

Re: [algogeeks] [brain teaser ] W Riddle 16 may

2011-05-16 Thread hary rathor
9 -- 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 group at h

Re: [algogeeks] Regarding the Master's project

2011-05-11 Thread hary rathor
*II.P1. Design & Implementation of Distributed Computing Algorithms for Integer Factoring & Discrete Log.* * * *II.P2. Design of Algorithms for Secure Cloud Computing & Data Processing.* * * *II.P3 Design & Analysis of Post-Quantum Cryptographic Schemes.* * * *II.P4. Secure Collaborative Cloud

Re: [algogeeks] GOOGLE INTERVIEW QUESTION

2011-05-09 Thread hary rathor
bro no company will accept your program with goto statement . -- 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..

Re: [algogeeks]

2011-05-06 Thread hary rathor
@venkatesan now you give the algorithm ... of O(n) -- 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...@googlegr

Re: [algogeeks] A SIMPLE C++ PROGRAM.

2011-05-01 Thread hary rathor
x=5 y=10 -- 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 grou

Re: [algogeeks] Re: Do you Think Allocating memory to 2D Array is easy ???

2011-05-01 Thread hary rathor
@harshit this not correct way . you will get segmentation fault while accessing the element .. you can see in book pointer in c -- 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. T

  1   2   >