int main()
{
int a[5]={1,2,3,4,5};
printf(%d,a[4]-a[0])
}
why it show 4 not 16?
--
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
Pointer incrementation and subtraction are done in terms of memory blocks
and not addresses of memory.
For example,
int *p;
p++;
The pointer here jumps to the next integer location and not the next address
in memory.
Similarly,pointer subtraction will give the difference in indexes and not
the
i didn't tried it .. but it might be internal conversion only , like
whenever we do +1 to the address of int it automatically convert it
into +4(i.e int size)
On Fri, Aug 12, 2011 at 11:34 AM, rohit rajuljain...@gmail.com wrote:
int main()
{
int a[5]={1,2,3,4,5};
printf(%d,a[4]-a[0])
}
Thanks a lot
On Aug 12, 11:25 am, Avinash Dharan avinashdha...@gmail.com wrote:
Pointer incrementation and subtraction are done in terms of memory blocks
and not addresses of memory.
For example,
int *p;
p++;
The pointer here jumps to the next integer location and not the next address
in
4*(sizeof(int *))
Thank you,
Siddharam
On Fri, Aug 12, 2011 at 11:56 AM, Varun Jakhoria varunjakho...@gmail.comwrote:
i didn't tried it .. but it might be internal conversion only , like
whenever we do +1 to the address of int it automatically convert it
into +4(i.e int size)
On Fri, Aug
On Fri, Aug 12, 2011 at 11:55 AM, Avinash Dharan avinashdha...@gmail.comwrote:
Pointer incrementation and subtraction are done in terms of memory blocks
and not addresses of memory.
For example,
int *p;
p++;
The pointer here jumps to the next integer location and not the next
address in
thanx...downloaded :)
On Fri, Aug 12, 2011 at 10:56 AM, coolfrog$ dixit.coolfrog.div...@gmail.com
wrote:
@all
can some plz suggest the source for where i can fine the dates and news
regarding amazon off-campus Placements.
On Fri, Aug 12, 2011 at 6:36 AM, Akash Mukherjee
iocl is coming to my college
please any dceite please tell what they are asking in their interview
process and what profile they are offering to the coe candidate
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
if given node has right subtree then its inorder successor will be left most
child of given node's right child. if given node does not have right child
the its successor will be its parent
On Fri, Aug 12, 2011 at 11:28 AM, Priyanka Goel
priyankatheinvinci...@gmail.com wrote:
How to find the
First thing tat should come to your mind s ' requirements ' ask him
wat de requirements are. He will expect tat..
On 8/12/11, MAC macatad...@gmail.com wrote:
Hi guys ,
Can anyone help me in understanding what is expected when some some one
asks you design a car rental system . Exactly
I understand , impact I find some more trials like these , I mean I
really about bit thinking hacks
On 8/12/11, Tarun Arya tarun@gmail.com wrote:
RAHUL@
d question was to reverse d 2 numbers...it can b done by wat i hav said...
if u want 2 extract numbers then
a0x0f //this wil giv
Hey guys,
please help me
can anyone post some written and interview question asked by
sourcebits
by
Guna
--
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
What Deoki answered in valid for non-leaf node.
Consider this tree:
3
/ \
4 5
/ \
6 7
According to Deoki's answer, 7's in-order successor is 4, which not correct.
the answer should be 3.
Here is the proper method (for leaf node only), Following Deoki's answer for
non-leaf:
- keep
I understand. where I find some more tricks like these , I mean I
really. find. bit thinking hacks. difficult to understand.
On 8/12/11, Tarun Arya tarun@gmail.com wrote:
RAHUL@
d question was to reverse d 2 numbers...it can b done by wat i hav said...
if u want 2 extract numbers then
thanks guys .. so lets take the question we had design a car rental
system .. so the interviewer can say , ok requirement is that you have a
pool of cars , people come and book a car for a particular time slot if
available . This is the most basic thing . so now what , what shd i do next
--mac
Explanation please
On Fri, Aug 12, 2011 at 9:33 AM, Dipankar Patro dip10c...@gmail.com wrote:
b.
On 11 August 2011 23:20, arvind kumar arvindk...@gmail.com wrote:
b.
On Thu, Aug 11, 2011 at 11:18 PM, Mani Bharathi
manibharat...@gmail.comwrote:
int(* fun()) [row][ Col];
What
if it were if(a,b,y,x) then output wud hav been EXAM
On Fri, Aug 12, 2011 at 4:14 AM, Prakash D cegprak...@gmail.com wrote:
@anuj kumar: try this
#includestdio.h
#includestring.h
int main()
{
int a=10,b=20;
char x=1,y=0;
printf(%d\n,a,b,x,y);
Ideally Speaking all of the option here seems not matching as this is the
function pointer not an ordinary pointer.
So the closest match is b but actually its not pointing to any 2 D or 3 D
array or somewhat but rather it points to the block of memory starts from
the dynamic address of row and
the thing is
Condition if(a,b,x,y)
is evaluated by the last variable present in it bcoz Comma Operator return
the last variable or constant present in it.
give y some other value than 0 you will see the difference
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT
@dipankar +1
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
On Fri, Aug 12, 2011 at 9:31 AM, Dipankar Patro dip10c...@gmail.com wrote:
The question is full of errors.
Provide the link, if you have copied it from somewhere.
On 11 August 2011 23:53,
to implement a binary search in an array which is sorted but roated by
some k places which is nt kwn time complexity O(logn)
--
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.
i doubt if it is possible in O(logn).
i think you can first 'k' in one traversal and then make the array as it was
before in O(n) and then apply binary search.so its basically a O(n)
solution...
if anyone has better ideas then please share !!.
--
Amol Sharma
Third Year Student
Computer
A huge paragraph has irregular spaces between the words, how to
effectively we can make everything to single space.
Example : My name is xyz
Should to converted to : My name is xyz
--
Thanks and regards,
Raghavan.K.L
http://in.linkedin.com/in/raghavankl
--
You received this message
easy can be done in O(n) time and in O(1)
On Fri, Aug 12, 2011 at 3:47 PM, Raghavan its...@gmail.com wrote:
A huge paragraph has irregular spaces between the words, how to
effectively we can make everything to single space.
Example : My name is xyz
Should to converted to : My name is
and in O(1) space
On Fri, Aug 12, 2011 at 3:53 PM, sagar pareek sagarpar...@gmail.com wrote:
easy can be done in O(n) time and in O(1)
On Fri, Aug 12, 2011 at 3:47 PM, Raghavan its...@gmail.com wrote:
A huge paragraph has irregular spaces between the words, how to
effectively we can make
void delExtraSpaces (char *Str)
{
int Pntr = 0;
int Dest = 0;
int flag=0;
while (Str [Pntr])
{
if (Str [Pntr] != ' ')
{
Str [Dest++] = Str [Pntr];
flag=0;
}
else if(Str[Ptr]==' ' flag==1)
Str [Dest++] = Str [Pntr];
else
flag=1;
Pntr++;
}
Str [Pntr] = '/0';
}
--
@Akshmkj , A Blog For Geeks , Fresher Might Stuck !!!
http://shashank7s.blogspot.com - Cracking The Code You Might Enjoy
Regards
Shashank Mani
Computer Science
Birla institute of Technology Mesra
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
@ Shashank :- Amazing one.. thx for Share.. :)
Prem
On Fri, Aug 12, 2011 at 4:15 PM, WgpShashank shashank7andr...@gmail.comwrote:
@Akshmkj , A Blog For Geeks , Fresher Might Stuck !!!
http://shashank7s.blogspot.com - Cracking The Code You Might Enjoy
Regards
Shashank Mani
@priya here is algorithm
Algorithm: (With Using Parent Pointer )
1) If right subtree of node is not NULL, then successor lies in right
subtree. Do following.
Go to right subtree and return the node with minimum key value in right
subtree.
2) If right sbtree of node is NULL, then successor is
@Dipankar Patro -
The figure u have made isn't a BST.Read the problem.
His soln. is correct.
--
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
sure, thanx :)
On Fri, Aug 12, 2011 at 4:15 PM, WgpShashank shashank7andr...@gmail.comwrote:
@Akshmkj , A Blog For Geeks , Fresher Might Stuck !!!
http://shashank7s.blogspot.com - Cracking The Code You Might Enjoy
Regards
Shashank Mani
Computer Science
Birla institute of Technology
Hi all,
i want to unsubscribe from this group.kindly make me out of this
group. now i am feeling little iritation from these mails.so please
..do thid needful
On 3/5/10, Umer Farooq the.um...@gmail.com wrote:
Thanks for lettimg me know that. Although I have used this kinda thingy in
earlier it has been posted in the group that check the size of pointer
variable,
if it is 2b then 16 bit
4b then 32 bit
8b then 64 bit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
Q2). i think for second question it will be enough to just swap the data of
current node to next node,
and delete the next node.
it will be like,
//for swap
int temp=current-data;
current-data=current-next-data;
current-next-data=temp;
//for delete
struct node *temp;
temp=current-next;
@Prem, akashmkj, Thanks Geeks, Whenever you read any post , do notify me
via mail or comment in post if anything wrong in post, i think this the
best way to test algorithm for different test cases making that efficient
.
*
Regards
Shashank Mani Computer Science Is Awesome So Why I Write
An array of integers is given and you have to find the largest possible
integer by concatenating all elements:
example:
array: 87 36 52
answer: 875236
array: 87 9 52
answer: 98752
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view
1 Sort the Array
2 Put it to the String Accordingly..
Prem
On Fri, Aug 12, 2011 at 6:04 PM, Yasir Imteyaz yasir@gmail.com wrote:
An array of integers is given and you have to find the largest possible
integer by concatenating all elements:
example:
array: 87 36 52
answer: 875236
Kindly check it with both the examples. It won't work.
--
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/-/VlT1DNH-vPkJ.
To post to this group, send email to
radix sort the digits wrong way (left most digit first), and then
concatenate
On Fri, Aug 12, 2011 at 6:12 PM, Yasir yasir@gmail.com wrote:
Kindly check it with both the examples. It won't work.
--
You received this message because you are subscribed to the Google Groups
Algorithm
Amazing ,
Kindly Follow me up :-
1 Given Array of Random Value ... say int a[]= {20,365,299,50,67,21};
Apply Any Sorting Algo on it... which Results into somewhat like
a={365,299,67,50,21,20,.. blah..}...
2 Well No U hv to put those values to a string variable.
Hi Guys Here is the algorithm for doing same in O(logn)
Hint : Find the pivot point, divide the array in two sub-arrays and call
binary search. Thats It :)
Algorithm
1. A Pivot Point is point around which array is rotated so 1st we need to
find out its location/index. lets say it pivot.
see the second example...if a single digit is there...tht will be at the
very end of the array...and if it is 9 it must come at first place...there
it goes wrong...
On Fri, Aug 12, 2011 at 6:23 PM, Prem Krishna Chettri hprem...@gmail.comwrote:
Amazing ,
Kindly Follow me up :-
1 Given
I will go with Trie or Treap http://en.wikipedia.org/wiki/Treap.It will
maintin the order of words as well , we will keep incrementing count of word
if appears more then once .If we use trie to find the count it takes o(k) ,
k being length of the word
structure of trie will be like this
Class
use something like radix sort, but from numbers left to right.
in given example: 87 36 52
87
36
52
place 87 then 52 than 36
if input is something like
9
87
36
52
place 9875236
this you can do with minor modification of radix sort.
thanks
Rajesh
On Fri, Aug 12, 2011 at 6:31 PM,
Program:
int arr[] = {12, 14, 15, 23, 45};
printf(%u %u\n, arr, arr);
Question: Why arr == arr ?
Comments:
1. arr is a variable that stores the address of location where arr[0]
resides. Complier shows arr and arr having same value. Shouldn't arr
be the address where arr resides?
Thanks
Monish
@umar u'll have to look back and see if the word already exists in the
list. if i am correct we need not to look up back , because when u will
insert words in dictionary (ordered or trie) , our algo will make sure that
if word already exist if yes increment corresponding count else insert node
Hi all
Can anyone tell me abiut the ADOBE internship tests,prroocess
followed,questions,etc.
Thanking u in advance.
Arvind
--
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
*process
On Fri, Aug 12, 2011 at 6:46 PM, arvind kumar arvindk...@gmail.com wrote:
Hi all
Can anyone tell me abiut the ADOBE internship tests,prroocess
followed,questions,etc.
Thanking u in advance.
Arvind
--
You received this message because you are subscribed to the Google Groups
@mukesh done :D
On Fri, Aug 12, 2011 at 1:07 PM, Mukesh kumar mukeshraj8...@gmail.comwrote:
Hi all,
i want to unsubscribe from this group.kindly make me out of this
group. now i am feeling little iritation from these mails.so please
..do thid needful
On 3/5/10, Umer Farooq
+1
On Fri, Aug 12, 2011 at 6:48 PM, arvind kumar arvindk...@gmail.com wrote:
*process
On Fri, Aug 12, 2011 at 6:46 PM, arvind kumar arvindk...@gmail.comwrote:
Hi all
Can anyone tell me abiut the ADOBE internship tests,prroocess
followed,questions,etc.
Thanking u in advance.
Arvind
--
@Yasir: I think the following will work. Counterexamples welcome.
Find the number of digits in each of the integers, and find the max of
that number, say m.
Fill a second array as follows: If the ith integer has m digits, copy
it into the second array. If the ith number has less than m digits,
I have use bactracking
http://codepad.org/rF4Sr3zk
it works for only 1 and 2digit number
On Fri, Aug 12, 2011 at 6:04 PM, Yasir Imteyaz yasir@gmail.com wrote:
An array of integers is given and you have to find the largest possible
integer by concatenating all elements:
example:
If you are in top 5 in your coe branch then dont take stress and if not then
dont worry about process bcoz they take only 2-3 student from top 5 each
year in GEN category .
On Fri, Aug 12, 2011 at 12:34 PM, coder coder
i.code.program...@gmail.comwrote:
iocl is coming to my college
please any
macro has not been terminated and it has so many errors
On Thu, Aug 11, 2011 at 11:36 PM, manvir siyo manis...@gmail.com wrote:
output of the program?
#define prn(a) printf(%d,a)
#define print(a,b,c) prn(a), prn(b), prn(c)
#define max(a,b) (a
main()
{
int x=1, y=2;
can anybody tell abt the interview process in cisco ?
--
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
is CISCO cuming fr recruitment ?? they are in huge loss and they have sacked
around 1 employees .
On Fri, Aug 12, 2011 at 7:18 PM, sukran dhawan sukrandha...@gmail.comwrote:
can anybody tell abt the interview process in cisco ?
--
You received this message because you are subscribed to
@Dave
How is the complexity O(n^2logn) .. Can you please tell
I believe there cant be solution better than O(n^2) unless u use FFT which
again is out of scope , at least for me :)
Regards
Ankur
2011/8/11 Samba Ganapavarapu sambasiv...@gmail.com
Can we find any alg. which runs faster than
@dave,
Awesome approach. It was really tough to find a counter example. :D
1st number: 23
2nd number: 23235
Applying ur algo:
23 - 2
-- 23235
Answer using ur algo: 2323235
However the correct answer should be: 2323523
Am I missing something in the above example? :-/
--
You
ankit.
flag ko wapis 0 kaun karega?
pehle code ko run karke check karna chahiye na.. !
mean multiple spaces jaruri nahi ki ek hi baar ho :P
On Fri, Aug 12, 2011 at 4:05 PM, ankit sambyal ankitsamb...@gmail.comwrote:
void delExtraSpaces (char *Str)
{
int Pntr = 0;
int Dest = 0;
A Top Down Memoization DP Algorithm Will be As Follow
Step 1. Declare an array of size N say jump[N];
where ith position indicates the number of jumps requires to reach from
start to this (ith) position in array .
Step 2. Initialize jump[0]=0; indicates to reach oth location form starting
I think tis works
On Fri, Aug 12, 2011 at 6:16 PM, Nitin Nizhawan nitin.nizha...@gmail.comwrote:
radix sort the digits wrong way (left most digit first), and then
concatenate
On Fri, Aug 12, 2011 at 6:12 PM, Yasir yasir@gmail.com wrote:
Kindly check it with both the examples. It
this is the question :
#includestdio.h
#define prn(a) printf(%d,a)
#define print(a,b,c) prn(a), prn(b), prn(c)
#define max(a,b) (ab?a:b)
int main()
{
int x=1, y=2;
print(max(x++,y),x,y);
print(max(x++,y),x,y);
return 0;
}
--
You received this message because you are subscribed to the Google
The code is buggy..
anyways the idea is to maintain two indexes one which points to the string
upto which spaces have been removed and one which travels with a constant
pace,,,
Kindly share the ideas with codesWriting code is a kid's affair.
On Fri, Aug 12, 2011 at 7:45 PM, sagar
On 12 August 2011 19:20, aditya kumar aditya.kumar130...@gmail.com wrote:
is CISCO cuming fr recruitment ?? they are in huge loss and they have
sacked around 1 employees .
well, this is what Goldman Sachs also did, but they are also doing
recruitment.
No company virtually ever stops
sorry
i missed the flag=0 in line 11...
but still ur code is not correct..
here is my code.
*
*
*#includestdio.h
#includestring.h
main()
{
int i,l,j=0,count=0;
char str[100]=hi! howare you? I m fine so say
whats goin on??? :P;
//printf(enter the
Guys sorry for posting the buggy code . Here is the working code :
void delExtraSpaces (char Str[])
{
int Pntr = 0;
int Dest = 0;
int flag=0;
while (Str[Pntr]!='\0')
{
if (Str[Pntr] != ' ')
{
Str[Dest++] = Str[Pntr];
flag=0;
}
else if(Str[Pntr]==' ' flag==0)
{
Str[Dest++] =
All DCE students are requested to upload the interview / written
questions which were asked by goldman sachs on 10 aug 2011 for
internship
thanks in advance .
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
thanks a lot mate .
On Aug 11, 4:51 pm, sindhu sindhu...@gmail.com wrote:
1. write a method to find the smallest angle between two hands when
the time is given as input???
2. given a number between 1 to 1000 convert it to words..example
235..it should print as two hundred thirty five..
3.
as i told download the book called cracking the coding interview , if you
read/workout the problems thats enough, i feel.
Thank you,
Siddharam
On Fri, Aug 12, 2011 at 5:53 PM, WgpShashank shashank7andr...@gmail.comwrote:
@Prem, akashmkj, Thanks Geeks, Whenever you read any post , do notify me
oh common shashank...its not that easy u told.
just do codingthen u will find the error in ur logic
On Fri, Aug 12, 2011 at 6:25 PM, WgpShashank shashank7andr...@gmail.comwrote:
Hi Guys Here is the algorithm for doing same in O(logn)
Hint : Find the pivot point, divide the array in
If its allowed in Haskell then only one line is enough.
import Data.List
stringWithspace :: String - String
stringWithspace xs = unwords.words $ xs
You can run this program on ideone [ http://ideone.com/RloOE ]
On Aug 12, 8:00 pm, ankit sambyal ankitsamb...@gmail.com wrote:
Guys sorry for
if someone can share one good solution , it would really help me. I am
unable to form the answer to these questions
--mac
On Fri, Aug 12, 2011 at 1:15 PM, MAC macatad...@gmail.com wrote:
thanks guys .. so lets take the question we had design a car rental
system .. so the interviewer can
pls do send the algorithm for interviews book to this email id..
prasat...@live.com
pls...
--
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
pls do share the book named Algorithm for interviews..
ebook pls
--
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
Check this out
//But this and fails for input such as: 101 ie all nos
must be unique..
int search_element_in_rotated_array(int *a, int low, int high, int
key)
{
while(low = high)
{
int mid = low + (high - low)/2;
if(a[mid] == key)
return
On Fri, Aug 12, 2011 at 8:16 PM, siddharth srivastava
akssps...@gmail.comwrote:
On 12 August 2011 19:20, aditya kumar aditya.kumar130...@gmail.comwrote:
is CISCO cuming fr recruitment ?? they are in huge loss and they have
sacked around 1 employees .
well, this is what Goldman Sachs
nope it will not work
top kya lower part bhi sorted hai..
like 7 8 9 1 2 3 4 5 6
do it with this i/p... it will fail
ur algo will do same thing for 8 and 4
FAIL !!!
On Fri, Aug 12, 2011 at 9:27 PM, KK kunalkapadi...@gmail.com wrote:
Check this out
//But this and fails for input
wats the ans to the 5th ques??
On Fri, Aug 12, 2011 at 8:54 PM, gaurav kumar mailmea...@gmail.com wrote:
thanks a lot mate .
On Aug 11, 4:51 pm, sindhu sindhu...@gmail.com wrote:
1. write a method to find the smallest angle between two hands when
the time is given as input???
2. given
well if we write the code simply as
#includestdio.h
int main()
{
1+2+4
}
it gives compilation error
if like this
#includestdio.h
int main()
{
1+2+4;
}
it will give warning:- no effect of code
if like this
#includestdio.h
int main()
{
int a= 1+2+4;
printf(%d,a);
}
it will give
Q.5 . [warning] initialization makes integer from pointer without a
cast.
On Fri, Aug 12, 2011 at 10:56 PM, sagar pareek sagarpar...@gmail.comwrote:
well if we write the code simply as
#includestdio.h
int main()
{
1+2+4
}
it gives compilation error
if like this
thanks:)
On Fri, Aug 12, 2011 at 11:06 PM, Anil Arya anilarya...@gmail.com wrote:
Q.5 . [warning] initialization makes integer from pointer without
a cast.
On Fri, Aug 12, 2011 at 10:56 PM, sagar pareek sagarpar...@gmail.comwrote:
well if we write the code simply as
just wondering...is there a standard ans to Q3 ?
On 12 August 2011 23:11, aditi garg aditi.garg.6...@gmail.com wrote:
thanks:)
On Fri, Aug 12, 2011 at 11:06 PM, Anil Arya anilarya...@gmail.com wrote:
Q.5 . [warning] initialization makes integer from pointer without
a cast.
On
pls send me too algorithm for interviews book. link.
On 8/12/11, sarath prasath prasathsar...@gmail.com wrote:
pls do send the algorithm for interviews book to this email id..
prasat...@live.com
pls...
--
You received this message because you are subscribed to the Google Groups
Algorithm
@ aditya,
Cisco is not in losses they make better profit then expected by the market
this quarter share rises by 16% after results.
Moreover cisco sacked only 2200 employees and some 2-3k took VRS.
On Fri, Aug 12, 2011 at 9:58 PM, Nanda Kishore
nanda.kishore...@gmail.comwrote:
On Fri, Aug
how abt http://ideone.com/lN2og ??
--
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/-/pZdvFb_t2b4J.
To post to this group, send email to
+1..me too need answers for this
On Fri, Aug 12, 2011 at 11:39 AM, MAC macatad...@gmail.com wrote:
if someone can share one good solution , it would really help me. I am
unable to form the answer to these questions
--mac
On Fri, Aug 12, 2011 at 1:15 PM, MAC macatad...@gmail.com wrote:
http://www.luschny.de/math/factorial/FastFactorialFunctions.htm
Does anyone know of resource for good/detailed explanation of factorial
algorithms on this site?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
As far as a Design Question like this is concerned:
1) Design a base class car
class Car {
String model;
String make;
String carSegment; // SUV, MUV, Sedans, Hatchbacks etc
String seats;
boolean bookingStatus; // Booked or not
...
public assignToCustomer (String custID) {...}
}
2) Design a
Answer=: 32
On Fri, Aug 12, 2011 at 8:05 PM, Avenged nitee...@gmail.com wrote:
this is the question :
#includestdio.h
#define prn(a) printf(%d,a)
#define print(a,b,c) prn(a), prn(b), prn(c)
#define max(a,b) (ab?a:b)
int main()
{
int x=1, y=2;
print(max(x++,y),x,y);
Ques 5 might be value of 1+2+'4'
https://ideone.com/8b91t
Obviously if we use , then it represents string and we can't define +
operation with other operand being an integer.
On Fri, Aug 12, 2011 at 11:06 PM, Anil Arya anilarya...@gmail.com wrote:
Q.5 . [warning] initialization makes
int compare(int a, int b) {
string s = Integer.tostring(a);
string y = Integer.tostring(b);
if (s +y y+s)
return -1;
else
return 1;
}
use this to write quick sort , you can get the answer.
On Fri, Aug 12, 2011 at 8:34 PM, Yasir Imteyaz yasir@gmail.com wrote:
An array of integers
I think CISCO sacked the employees in 'Flip' Deptt. (as it appears on Web).
Flip was something out of networking domain, and it failed. So CISCO is now
refocusing on their networking infrastructure and networking products that
it is famous for.
Lets hope hiring will continue the same as last
@ Neeraj:
1+2+'4' will be very simple to calculate: 3+48+4 = 55
But 1+2+4 is a good question.
On 13 August 2011 06:10, Neeraj Gupta neeraj.gupta...@gmail.com wrote:
Ques 5 might be value of 1+2+'4'
https://ideone.com/8b91t
Obviously if we use , then it represents string and we can't define
First question:
- .Read the data from the first list and put it in a stack
- Traverse the next list and compare by reading elements from the stack
- This would solve it
Second question:
- Take an list like 1-2--3-4
- If you are given with 2, juz copy the value and reference of
Thanks for the link. I was unaware of such algorithms. These would
come handy in programming contests.
On Fri, Aug 12, 2011 at 3:00 PM, Nitin Nizhawan
nitin.nizha...@gmail.com wrote:
http://www.luschny.de/math/factorial/FastFactorialFunctions.htm
Does anyone know of resource for good/detailed
95 matches
Mail list logo