Re: [algogeeks] VIDEO STREAMING

2012-11-24 Thread Kartik Sachan
@surabh sab jagah hath mar liya beywhy don't u help me out...vase bhi aab toh tum free bhi ho gye ho ge..:P:P --

Re: [algogeeks] INTERVIEW QUESTION

2012-10-26 Thread Kartik Sachan
@payal why u need this..??...:P:P -- 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] Re: Interview question

2012-03-25 Thread Kartik Sachan
+1 @saurabh...:P -- 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

Re: [algogeeks] ITRIX'12 OPC

2012-03-20 Thread Kartik Sachan
+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, visit this group at

Re: [algogeeks] Puzzle

2012-02-27 Thread Kartik Sachan
I think logic is the difference is 2 2 4 2 2 2 8 so next will be 2 2 2 2 2 16 so ans will be 66 68 70 but first number 3 making some problem -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks]

2012-02-17 Thread Kartik Sachan
output depend upon complier how it store floating point number actualy exactly 0/3 is not stored in memory some 0.299 like this is stored so its totally implementation dependent.. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To

Re: [algogeeks] Re: spoj

2012-02-16 Thread Kartik Sachan
@atul by doing through link list it will give TLEu have to derive some kind of formula .. and till now i am unable to find that kartik.sac...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

Re: [algogeeks] Array Problem

2012-02-14 Thread Kartik Sachan
if n is less than 10^6 hasing works fine ..and we count in O(1) time only -- 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]

2012-02-12 Thread Kartik Sachan
its a compiler depentent... -- 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] c output ??

2012-01-09 Thread Kartik Sachan
@amol I think it is not the behaviour of printf -- 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] Removing same character(s) in a group

2011-12-12 Thread kartik sachan
+1 amol sharma...what u want ??.output should be shown at every step or u want final ans?? -- 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]

2011-11-28 Thread kartik sachan
@DAVE that was typing mistake... -- 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]

2011-11-27 Thread kartik sachan
simply find max in o(n) by liner search then remove max then again find max that will be second max:P :P -- 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

Re: [algogeeks] regarding start of loop in linked list

2011-11-20 Thread kartik sachan
@amol..we can simply break the loop where we find the slow and fast pointer meeting,then its become a a problem of two link list having common ending point and different staring point and for detecting the extact point where loop began is two traverse both the list and find its length lets say 'a'

Re: [algogeeks] Given a int N, write a function to return the closest Fibonacci Number

2011-11-20 Thread kartik sachan
yup using matrix method we can solve it in O(log(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

Re: [algogeeks] NULL pointer

2011-11-14 Thread kartik sachan
yup. -- 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

[algogeeks] ARTICULATION POINT ALGO

2011-10-23 Thread kartik sachan
PLEASE ANY BODY CAN EXPLAIN ME ARTICULATION POINT ALGO IN DETAIL PLZ TAKE SOME EXAMPLE TOO -- *WITH REGARDS,* * * *KARTIK SACHAN* *B.TECH 3rd YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

Re: [algogeeks] Re: ARTICULATION POINT ALGO

2011-10-23 Thread kartik sachan
yup but didn't get much out of it... -- 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: fibonicci doubt

2011-10-02 Thread kartik sachan
@rahul if u have to find first 100 even fibonacci term sum the u have to simply find the t2n+1 term -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

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread kartik sachan
@AMOL i want array index i.e i to j that will be max subarry which has equal no of zero and one's but i think ur soln is not providing this -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] ARRAY PROBLEM

2011-09-29 Thread kartik sachan
ok amol i will do it..but i am unable to convience myself that this algo will give the desire result -- 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

[algogeeks] ARRAY PROBLEM

2011-09-28 Thread kartik sachan
,* * * *KARTIK SACHAN* *B.TECH 3rd YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- 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: question

2011-09-22 Thread kartik sachan
@ratan suggest some efficient algo... -- 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: Microsoft Question

2011-09-22 Thread kartik sachan
@dheeraj i didn't get what u want to say explain me with the help of 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

Re: [algogeeks] Re: Microsoft Question

2011-09-21 Thread kartik sachan
i think i can solve this in O(n^2) here is code http://ideone.com/Gk69A # includestdio.h# includestring.hchar a[100][100];int findword(int *b,int n,int m){ int i,j,flag=0; char s[1]; for(i=0;in;i++) for(j=0;jm;j++) s[a[i][j]]++;

Re: [algogeeks] Re: c output

2011-09-21 Thread kartik sachan
@sukran if it is undefined in ansi c so it can return any value??? at complilaton.but all time it is giving me same value -- 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.

Re: [algogeeks] question

2011-09-21 Thread kartik sachan
http://ideone.com/xRnDo # includestdio.h# includestring.hvoid findbig(char *a){ int i,j; int flag=0; for(i=strlen(a)-1;i0;i--) if(a[i-1]a[i]) { char temp=a[i]; a[i]=a[i-1]; a[i-1]=temp; flag=1;

Re: [algogeeks] Re: c output

2011-09-21 Thread kartik sachan
thanks sukran... i have one more question evaluation of printf is also undefined 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. To unsubscribe from this group,

[algogeeks] C OUTPUT

2011-09-21 Thread kartik sachan
how no's are stored -- *WITH REGARDS,* * * *KARTIK SACHAN* *B.TECH 3rd YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- 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

Re: [algogeeks] Re: question

2011-09-21 Thread kartik sachan
obivously it will be first largest -- 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] C OUTPUT

2011-09-21 Thread kartik sachan
@ravi i think ur concepts is correct the no is stored in 2's formif negative thanks ravi -- 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: question

2011-09-21 Thread kartik sachan
@arya ur code for 7695...giving ans 9765 but ans should be 7965 -- 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] Programs

2011-09-19 Thread kartik sachan
@bharatkumar i think u r in thinking oder in lexicographic order .but in question its not the same... we have print the according to the sentence not according to dictonary -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] C Problem

2011-09-19 Thread kartik sachan
+1 to yogesh -- 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] DS QUESTION

2011-09-18 Thread kartik sachan
given n nodes ,how many different possible tree can be formed??(not necessary that all are binary treeit could be any tree...) -- *WITH REGARDS,* * * *KARTIK SACHAN* *B.TECH 3rd YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- You received this message because you

Re: [algogeeks] c output

2011-09-18 Thread kartik sachan
@what's special in this ... it is giving 0 in both cases. basically a garbage value -- 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: whats d problem wid using gets?

2011-09-08 Thread kartik sachan
using gets we can get buffer over as gets doesn't check about the size input so it mai go to that area where our stack base pointer(think in memory layout section) is stored so our programmed doenn't return to orignal state as address is stored there...so it is dangeroues to use -- You

Re: [algogeeks] c doubt

2011-08-31 Thread kartik sachan
@ prateek i am still not geeting why now out put is 4 but if we change second bit2:5 then out put again 8 plzz explain throughly -- 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.

Re: [algogeeks] c doubt

2011-08-31 Thread kartik sachan
becoz int is of 4btyes so 32 bits required -- 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] c doubt

2011-08-30 Thread kartik sachan
@prateek check this i have complied on ideone http://ideone.com/UV7MG output is 4 only -- 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: APTITUDE QUESTIONS

2011-08-30 Thread kartik sachan
for 1st question ans will be a,b,e as (125)^1/3 is 5 sum is 8 for 2nd question we see pattern in 7 power i.e 7,9,3,1 and this pattern reapeats for inerval of 4 and second term of of any power of 7=2 is 4 so diff is 5 ans will be 5 how to find the ans of third question?? -- You received this

Re: [algogeeks] Explanation

2011-08-29 Thread kartik sachan
see the out put will the help of gcc -E.u will get ur ans -- 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] Re: SPOJ ACODE

2011-08-28 Thread kartik sachan
THANKs amol piyush i got my mistake -- 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] c doubt

2011-08-28 Thread kartik sachan
@PRATEEK if i make int bit1:2 then it will store 2 bytes for example if bit1=4;then out will be 0 or 1 my question is it storing number from least significant bit or most significant bit??? suppose for 4 0100 so out will be 00 or 01?? -- You received this message because you are subscribed to

Re: [algogeeks] SPOJ Problem DIVSUM

2011-08-28 Thread kartik sachan
it can be simply done in O(sqrt(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] Re: SPOJ ACODE

2011-08-27 Thread kartik sachan
koyi to test cases de jisme mera code fail kare? -- 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] Re: SPOJ ACODE

2011-08-27 Thread kartik sachan
thanks piyush for replying but i don't have complier for java and i don't know even java -- 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

[algogeeks] SPOJ ACODE

2011-08-26 Thread kartik sachan
,* * * *KARTIK SACHAN* *B.TECH 3rd YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- 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

[algogeeks] Re: SPOJ CENCRY

2011-08-10 Thread kartik sachan
any body tell the test cases?? -- 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] Re: SPOJ CENCRY

2011-08-10 Thread kartik sachan
thanks nitin got AC...:) silliy mistake -- 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

[algogeeks] SPOJ CENCRY

2011-08-09 Thread kartik sachan
]); } printf(\n); } return 0; } plzz help me.. -- *WITH REGARDS,* * * *KARTIK SACHAN* *B.TECH 3rd YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] output???

2011-08-05 Thread kartik sachan
the output will be hi even if u have putted equal to sign there this is becoz 0.7 do not exactly stored like 0.7 in a but some thing lesser as describe in ASCII format that's why it is awlays lesser than 0.7 -- You received this message because you are subscribed to the Google Groups Algorithm

Re: [algogeeks] Duplicates in a string

2011-08-05 Thread kartik sachan
I think in this case count sort type thing would work better way just take a array of max 26(as 26 CHARACTER ARE THERE) and using index as count['M']=store how many times M has comes similary store other character now print array whose value 0 but IN this case u might lost the

Re: [algogeeks] Re: Duplicates in a string

2011-08-05 Thread kartik sachan
@priya its some thing like this for(i=0;a[i]!='\0';i++) count['a[i]']++; so its O(n) only -- 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

Re: [algogeeks] Re: Give an efficient search algo

2011-08-04 Thread kartik sachan
@amit it's given that array is increasing then decreasing..so where there is change from incre to drece that value of i in loop will be k in this we can find out k if not given -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Re: Direct - i ques

2011-08-01 Thread kartik sachan
@ankit i am saying at the time of insertion of first element to last we have to maintain a min element which store the min number -- 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.

Re: [algogeeks] plz explain

2011-08-01 Thread kartik sachan
i think this will be the only 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. For

Re: [algogeeks] Max subarray of no 2 adjacent elements

2011-08-01 Thread kartik sachan
I think then output should be 17 not 13?? correct me if i am wrong and explain too -- 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] Max subarray of no 2 adjacent elements

2011-08-01 Thread kartik sachan
oh..got it i didn't read that 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

Re: [algogeeks] Re: Missing elements

2011-08-01 Thread kartik sachan
similar type algo is there in geeksforgeeks.org in array section from there u can understand it better way -- 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] Re: Direct - i ques

2011-07-31 Thread kartik sachan
I think its stack where deletion insertion and finding min (as we will cal min at the time of insertion only by taking min val ) will take O(1) time correct me if i am worng...! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

[algogeeks] OUTPUT PROBLEM

2011-07-30 Thread kartik sachan
#include stdio.h void foo(const char **p) { } int main(int argc, char **argv) { foo(argv); return 0; } why the above code giving me warning can body explain me?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To

Re: [algogeeks] OUTPUT PROBLEM

2011-07-30 Thread kartik sachan
*@AMOL *sending a normal pointer to a const pointer doesn't give any warning why this is giving?? -- 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] Re: SPOJ GPA1

2011-07-01 Thread kartik sachan
@thanks ceg sirfinally got acceptedur test case worked..silly mistake...= error -- 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.

Re: [algogeeks] Re: SPOJ GPA1

2011-06-29 Thread kartik sachan
@sunny atof(ab) is giving me as zero.so it will not affect the calculation i think so... -- 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

Re: [algogeeks] Re: spoj shlights

2011-06-28 Thread kartik sachan
GOT AC IN .02 SEC .:))) -- 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] Re: spoj shlights

2011-06-28 Thread kartik sachan
@VAIBHAV.ur logic fails in many cases...like G -- 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] Re: spoj shlights

2011-06-28 Thread kartik sachan
anonymous u have to play with the index no of either G or B...and see how many shift it will require to reach it original postion then max will be the ans.. well GBGBBB if we start from right to left then G=3 and G=5 first G have reach to 0 pos and second G have to reach

Re: [algogeeks] Re: spoj shlights

2011-06-28 Thread kartik sachan
@ vaibhav i have submitted my concept in spoj and it got AC in .02 sec i am saying for u have to play with index of EITHER of G or B now u have to think logic by taking two or more exmaple and shift it in...do it in paperu will see some pattern -- You received this message

Re: [algogeeks] Re: spoj shlights

2011-06-28 Thread kartik sachan
http://www.spoj.pl/problems/SHLIGHTS/ this is the link -- 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] SPOJ GPA1

2011-06-28 Thread kartik sachan
,* * * *KARTIK SACHAN* *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- 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

Re: [algogeeks] Re: spoj shlights

2011-06-28 Thread kartik sachan
if u want code then mail me. -- 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: spoj shlights

2011-06-27 Thread kartik sachan
HEY DUDE I AM NOT GETTING UR LOGIC AT ALL I THINK HOW U WILL SATISFY THIS CASE GBGBBB -- 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: spoj shlights

2011-06-25 Thread kartik sachan
@jitendra that's what i am asking forwhat algo i should implement to get process in 1 sec? -- 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] Re: Segmentation fault

2011-06-23 Thread kartik sachan
@ anonymous here u see the formula where it is clearly mention for single step the value of k is not changing so we can solve this question by taking single dimensional array instead of two dimensional array and in 1D array we have large size to store value for DP as compare to 2D array --

Re: [algogeeks] Re: Segmentation fault

2011-06-23 Thread kartik sachan
@saurabh circular link list implementation i think tough as camparision to single array -- 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: Segmentation fault

2011-06-23 Thread kartik sachan
@anoyomous take array size as a[106] and dude to intilize array to zero u si,ply write a[106]={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

[algogeeks] spoj shlights

2011-06-22 Thread kartik sachan
; flag=count; } printf(%d\n,count); } return 0; } PLZZ HELP ME OUT OR SUGGEST ANY OTHER LOGIC IF IT HAS SOME MISTAKES -- *WITH REGARDS,* * * *KARTIK SACHAN* *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- You received this message because you

Re: [algogeeks] finding vlaue of nCr

2011-06-21 Thread kartik sachan
but for big numbers this method is very expensiveand hope give TLE in 1 sec question where n=1000 -- 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

Re: [algogeeks] finding vlaue of nCr

2011-06-21 Thread kartik sachan
@ sunny i am not getting ur apporach but i am thinking like this.. taking an array from and intilize it to n to n-r a[1000]; int k=0; for(int i=n;i=n-r;i--) a[k++]=i; for(int y=n-r;y1;y--) for(j=0;jk;j++) if(a[j]%y==0) {a[j]=a[j]/y;break;} for example we take 7c3 so first array is

Re: [algogeeks] Re: finding vlaue of nCr

2011-06-21 Thread kartik sachan
hey sunny suppose u have to calculate 100c50 then there is a lot of chances of over flow becoz u have to multiply 100 to 50...i don't think it will work.. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] Re: finding vlaue of nCr

2011-06-21 Thread kartik sachan
hey anika here n=1 and n=0 so its 1 only -- 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: finding vlaue of nCr

2011-06-21 Thread kartik sachan
sir i think the same ans i gave the above.. -- 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] Re: spoj NKTM

2011-06-16 Thread kartik sachan
without priority queue its .08 and with priority queue its .0.00 -- 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] FIBONACCI problem.

2011-06-16 Thread kartik sachan
ACTUALLY FIBBONACCI SERIERS REAPEAT AFTER 60 TERM SO 246%60 WILLBE 6 SO WE ONLY HAVE TO FIND M+6 TERM -- 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] FIBONACCI problem.

2011-06-16 Thread kartik sachan
@vipul what algo u have applied for o(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.

Re: [algogeeks] FIBONACCI problem.

2011-06-16 Thread kartik sachan
most simple with bash..using formula 11*f(n+6)+11*f(n+6)%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

Re: [algogeeks] Re: is it correct??

2011-06-15 Thread kartik sachan
hey is itoa() is supported by g++ compliers??? -- 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] Re: spoj NKTM

2011-06-15 Thread kartik sachan
ya dude finally i applied that algo only -- 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: is it correct??

2011-06-14 Thread kartik sachan
it is correct ...in c++ 4.3.2 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.

[algogeeks] spoj NKTM

2011-06-14 Thread kartik sachan
... -- *WITH REGARDS,* * * *KARTIK SACHAN* *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- 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

[algogeeks] Re: spoj NKTM

2011-06-14 Thread kartik sachan
got AC silliy mistake i am sorting array only one 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] Re: spoj NKTM

2011-06-14 Thread kartik sachan
case like 5 1 2 3 45 got worng ans -- 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] find error

2011-06-13 Thread kartik sachan
amit it is working fine in gcc complier and giving out too i.e 10 what's error in it?? -- 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] Re: FOR ALL INDIANS PLZ READ IT

2011-06-12 Thread kartik sachan
hey dude nominate me as a group moderator kartik.sac...@gmail.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 to

Re: [algogeeks] Re: FOR ALL INDIANS PLZ READ IT

2011-06-12 Thread kartik sachan
@shady sorry dude.i am nominating pramendra prathi...@gmail.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 to

Re: [algogeeks] Re: FOR ALL INDIANS PLZ READ IT

2011-06-11 Thread kartik sachan
what dignity u are going to maintain.apne desh k liye kuch to karo mere dost.apne desh ki dignity nhi bache gi to is group ki bacha k kya karo ge??and by the i didn't put any thing wrong in the group.many educated indian are there in the group i

[algogeeks] SPOJ THRBL

2011-06-10 Thread kartik sachan
; } return 0; } why i am getting TLE...can anyone explain this...plzz -- *WITH REGARDS,* * * *KARTIK SACHAN* *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] SPOJ THRBL

2011-06-10 Thread kartik sachan
what i understand from the problem was that. n no of higests are given and a and b and city no i.e from city a a ball is thrown to city no b so i have done from array a[] i.e hieght { n...no of times} find all the element between b[i].city A and

Re: [algogeeks] SPOJ THRBL

2011-06-10 Thread kartik sachan
how should we get TLE loop total running less than 10^6?? -- 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

  1   2   >