@mohit : +1
On Sat, Aug 13, 2011 at 9:20 AM, Raghavan its...@gmail.com wrote:
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
+1 ...plz upload the qs
--
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,
1.scan the array and find the maximum digits of integer. lets say m..
2.Again scan the array and pad the intergers whose digits are less that m (
m) with zero's .. copy the new integers in a new array
3.sort the new array in desc order and carry the same even for original
array.
4. Now the
folks ..
for second problem .. the mentioned algo doesn't work for last node.. I mean
copying data of next node and aalso making nxt-nxt as nxt node.. and
deleting the next node..
in case of last node.. how can we delete the last node being on that node?
even though if we use free (node) ... the
+1
On 8/12/11, Mangal Dass mangaldass1...@gmail.com wrote:
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
@$ did not understand how the original array is sorted to give the number!
On Sat, Aug 13, 2011 at 12:50 PM, *$* gopi.komand...@gmail.com wrote:
1.scan the array and find the maximum digits of integer. lets say m..
2.Again scan the array and pad the intergers whose digits are less that m (
m)
@$ the ans should be 9823191 and not 98231910
On Sat, Aug 13, 2011 at 12:59 PM, Nikhil Veliath nve...@gmail.com wrote:
@$ did not understand how the original array is sorted to give the number!
On Sat, Aug 13, 2011 at 12:50 PM, *$* gopi.komand...@gmail.com wrote:
1.scan the array and find the
hi nikhil..
correct ... just type error..
but as per my algo .. as we need to consider the elements of original
array... the last element is 1 , but not 10.
On Sat, Aug 13, 2011 at 1:01 PM, Nikhil Veliath nve...@gmail.com wrote:
@$ the ans should be 9823191 and not 98231910
On Sat, Aug 13,
import java.util.Arrays;
import java.util.Comparator;
public class NewSort implements ComparatorInteger {
@Override
public int compare(Integer o1, Integer o2) {
String s1 = o1.toString();
String s2 = o2.toString();
String com1 = s1 + s2;
String com2 = s2 + s1;
if (com1.compareTo(com2) 0 ) {
we will sort the new array in desc order .. and we will carry the same order
even to original array..
so after sorting the new arraay will be 90,80,23,19,10 .. so corresponding
original array is 9823191
On Sat, Aug 13, 2011 at 12:50 PM, *$* gopi.komand...@gmail.com wrote:
1.scan the array and
me too... desperately need that
ramangugnani@gmail.com
On 13 August 2011 00:27, arvind kumar arvindk...@gmail.com wrote:
+1
On 8/12/11, Mangal Dass mangaldass1...@gmail.com wrote:
pls send me too algorithm for interviews book. link.
On 8/12/11, sarath prasath
Given a string which oly has 0's and 1's . Find the maximum largest
substring which have equal no of 0's and 1's and give the length of the
substring .
whether it can be solved in DP ?? or any other soln ?
for example :
given string : 001101000
output :0101
--
You received this message
Given a string which has repeating pattern .Find the repeating pattern and
the length of the pattern .
Example:
123123123123123
output :
123
lenth is 3
1122222211
output :
112211
lenght is 6
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
Given 2 trees .Find wether second tree is the subtree of the first tree .
here is my soln corect me if i m wrong:
bool find(struct node * tree,struct node *subtree)
{
if(tree==NULL )
return ;
if(tree-data==subtree-datafind(tree-left,subtree-left)
find(tree-right,subtree-right)
@ $: how ll you manage something like this:
2,3,100,90,10
2nd array becomes: 200,300,100,900,100
descendng order: 900,300,200,100,100
how to take care which 100 is of 10 cos we need 10 1st...??
On Aug 13, 1:00 pm, rahul aravind rahularavin...@gmail.com wrote:
awesome alogoritm dave:):)
Dynamic programming would surely help but i dont know the algo :| :P
--
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/-/MD3432cto60J.
To post to this group,
plz post the code for implementation of suffix tree and skip list in
C/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, send email to
Can anyone tell me AMAZON's written test pattern??
--
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
yes you are right
Thank you,
Siddharam
On Thu, Aug 11, 2011 at 10:21 AM, Abhishek gupta
mailatabhishekgu...@gmail.com wrote:
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
no, search the archives, you will find everything.
*thread
closed***
On Sat, Aug 13, 2011 at 3:00 PM, aditi garg aditi.garg.6...@gmail.comwrote:
I have attached google resume wid
can be done using suffix trees..
On Sat, Aug 13, 2011 at 2:06 PM, Brijesh Upadhyay
brijeshupadhyay...@gmail.com wrote:
Dynamic programming would surely help but i dont know the algo :| :P
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
google it :P
On Sat, Aug 13, 2011 at 2:09 PM, deepikaanand swinyanand...@gmail.comwrote:
plz post the code for implementation of suffix tree and skip list in
C/C++
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group,
search archives
On Sat, Aug 13, 2011 at 2:10 PM, contiguous priyadee...@gmail.com wrote:
Can anyone tell me AMAZON's written test pattern??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
Yeah,it will print some garbage string,as 4 has only one character and it
is pointing to 4th character(1+2).
As an example:
int main(){printf
http://www.opengroup.org/onlinepubs/009695399/functions/printf.html(1+2+I
am good);return 0;}
Gives output:: m good
On Sat, Aug 13, 2011 at 2:59 PM,
maybe we can use KMP PREFIX function to find ans.
On Sat, Aug 13, 2011 at 3:20 PM, *$* gopi.komand...@gmail.com wrote:
can be done using suffix trees..
On Sat, Aug 13, 2011 at 2:06 PM, Brijesh Upadhyay
brijeshupadhyay...@gmail.com wrote:
Dynamic programming would surely help but i dont
- Keep an counter for first stuck number(0/1)
- increment it, if you stuck on other number, start decrementing it
- if the counter becomes zero,note that seq
- finally take the longest seq
Hope this could solve the problem.
On Sat, Aug 13, 2011 at 1:56 PM, vicky S
@Yasir: Yups...I also have the same algo...
Just to improvise your solution, you need not do binary search on both sides
of the pivot.
Just check End points (min-max) of the both sub-array to decide which side
to do a binary search..This works in the case of duplicate elements too.
for e.g.
2 5
Yeah got it. Thanks :)
--
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/-/NAqtuyQmehgJ.
To post to this group, send email to algogeeks@googlegroups.com.
To
[Quote]
arr has the address to the base of an array of three int's.
arr is the address of the first element of that same array.
[/Quote]
^^ Found on web.
check the difference by printing arr+1 and arr+1. The former will skip one
element, but later will skip the whole array.
On 12 August 2011
Following approach should work:
1) Count max number of digit in any integer of input. Let it be m. (Thanks
to dave..)
2) For each int having less than m digits:
Convert it to string of length m where you append circularly.
For e.g. if m=5
53 -- 53535
100 -- 10010
--
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
they sort student according to the current cgpa or percentage in each
category means general,OBC sc and st. the interview is easy ,they dont ask
tough question just simply basic one.whatsoever be the interview they alway
select the person with higher cgpa or percentage
On Fri, Aug 12, 2011 at
@rohit: Cast pointer to an integer into an int to get what you are
expecting.
for e.g.
printf(%d,(int)a[4]-(int)a[0]);
This will give 16.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
e g: scanf(%2.4d,a);
--
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,
this routine will extract k msb's and will print them
n is the number,,
and k is the no of bits u wnt to print..
void k_msb(int n, int k)
{
int mask;
int count=0;
int r;
for(int i=31;i=0;i--)
{
if(count==k)
break;
mask=1i;
r=maskn;
http://lmgtfy.com/?q=scanf+float+precision+format
On Sat, Aug 13, 2011 at 5:42 PM, SuDhir mIsHra
sudhir08.mis...@gmail.com wrote:
e g: scanf(%2.4d,a);
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
wonderful :)
On Sat, Aug 13, 2011 at 6:30 PM, Rahul raikra...@gmail.com wrote:
lol++
Rahul
On Sat, Aug 13, 2011 at 6:14 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote:
lol
On Sat, Aug 13, 2011 at 6:12 PM, Gaurav Menghani
gaurav.mengh...@gmail.com wrote:
is printing a n*n array,spirally is same as printing it helically??
or is there any difference between the two??
--
Regards,
Kamakshi
kamakshi...@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
anyone?
On Fri, Aug 12, 2011 at 3:49 AM, cegprakash cegprak...@gmail.com wrote:
there are n number of items available in the shop
price[] {size n} gives the cost of each item
and there are quantity[] {size n} means that there are quantity[i]
number of i'th item
the shop keeper provides
I think they both refer to the same in case of 2-D array.
helical can be seen as a movement in 3-D where it is spiral in two
dimensions and linear in one left out dimension.
On 13 August 2011 18:54, Kamakshii Aggarwal kamakshi...@gmail.com wrote:
is printing a n*n array,spirally is same as
@shashank
acc to me the problem can be done easily using greedy approach
https://ideone.com/dYbUd ( it is your non optimal greedy solution
with just one line added )
couldn't find any case where the above code is giving wrong answer .
if you know any case, please let me know.
I wrote a dp
Which of the following statements are correct about the below declarations?
*char *p = Sanjay;
char a[] = Sanjay;*1:There is no difference in the declarations and both
serve the same purpose.2:*p* is a non-const pointer pointing to a non-const
string, whereas *a* is a const pointer pointing to a
if k is fixed, sort the items according to their price, buy k cheapest items
start taking the most expensive item fr free
actually tht is nt a real lyf prblem, usually the dealers limit no. of free
items on a single bill k i never constant, tht may create
inconsistencies.
On Sat,
@divye and abhishek : Thanks :)
On Tue, Aug 9, 2011 at 11:00 PM, DK divyekap...@gmail.com wrote:
Please read the specifications IEEE 754 for representation of single digit
floating point numbers.
http://en.wikipedia.org/wiki/Single_precision_floating-point_format
2.
On Sat, Aug 13, 2011 at 7:24 PM, Raman raman.u...@gmail.com wrote:
Which of the following statements are correct about the below declarations?
*char *p = Sanjay;
char a[] = Sanjay;*1:There is no difference in the declarations and both
serve the same purpose.2:*p* is a non-const pointer
also 3,4
On Sat, Aug 13, 2011 at 7:30 PM, Rohit Srivastava access2ro...@gmail.comwrote:
2.
On Sat, Aug 13, 2011 at 7:24 PM, Raman raman.u...@gmail.com wrote:
Which of the following statements are correct about the below
declarations?
*char *p = Sanjay;
char a[] = Sanjay;* 1: There is no
@kunal: seems fine.. tried it on some cases...
On Sat, Aug 13, 2011 at 5:17 PM, Kunal Patil kp101...@gmail.com wrote:
Following approach should work:
1) Count max number of digit in any integer of input. Let it be m. (Thanks
to dave..)
2) For each int having less than m digits:
In statement 2, isn't p pointing to const string, as we cannot modify the
characters of the string.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
3,4
On Sat, Aug 13, 2011 at 7:39 PM, Raman raman.u...@gmail.com wrote:
In statement 2, isn't p pointing to const string, as we cannot modify the
characters of the string.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this
@ashmantak: the figure of dipankar is incorrect but his point is correct..
for a tree like
4
/\
2 10
/ \
13
successor of 3 shall be 4 not 2..
On Fri, Aug 12, 2011 at 4:48 PM, ashmantak
How do you make sure to unlock a mutex which was locked in a thread that
dies/terminates?
--
Regards,
Kamakshi
kamakshi...@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
Nice one Gaurav Menghani
On 13 August 2011 18:39, shady sinv...@gmail.com wrote:
wonderful :)
On Sat, Aug 13, 2011 at 6:30 PM, Rahul raikra...@gmail.com wrote:
lol++
Rahul
On Sat, Aug 13, 2011 at 6:14 PM, SANDEEP CHUGH
sandeep.aa...@gmail.comwrote:
lol
On Sat, Aug 13, 2011 at
1 or 2 stairs?
On Sat, Aug 13, 2011 at 8:24 PM, Kamakshii Aggarwal
kamakshi...@gmail.comwrote:
Given n stairs, how many number of ways can you climb if u use either 1 or
2 at a time?
--
Regards,
Kamakshi
kamakshi...@gmail.com
--
You received this message because you are subscribed to
yes
On Sat, Aug 13, 2011 at 8:30 PM, Puneet Goyal puneetgoya...@gmail.comwrote:
1 or 2 stairs?
On Sat, Aug 13, 2011 at 8:24 PM, Kamakshii Aggarwal kamakshi...@gmail.com
wrote:
Given n stairs, how many number of ways can you climb if u use either 1 or
2 at a time?
--
Regards,
Knapsack DP
On Sat, Aug 13, 2011 at 8:35 PM, Kamakshii Aggarwal
kamakshi...@gmail.com wrote:
yes
On Sat, Aug 13, 2011 at 8:30 PM, Puneet Goyal puneetgoya...@gmail.com
wrote:
1 or 2 stairs?
On Sat, Aug 13, 2011 at 8:24 PM, Kamakshii Aggarwal
kamakshi...@gmail.com wrote:
Given n stairs,
There is a river and there are n number of steps between two banks of the
river to cross the river.
A frog wants to cross the river with the condition that he can jump max one
step. Find the number of ways he can cross the river?
For e.g. if there are 3 steps in between, frog can go from
It is the solution for inorder successor without having parent pointer..
node *inorder_succ(node *root, int x)
{
node *prev=NULL;
node *p=findspcl(root,prev, x);
if(p-r)
{
p=p-r;
while(p-l)
p=p-l;
return p;
@Sagar Dude , oh common shashank...its not that easy u told. I Hope
You Understand the question properly ? or you are talking about *bitonic
sequence* if not then just point the obvious or no-obvious bug in above
algorithm, Same Algo is coded below by Yasir, also Kunal Also suggested some
dp problem, refer to dp from AFI
On Sat, Aug 13, 2011 at 9:01 PM, Decipher ankurseth...@gmail.com wrote:
There is a river and there are n number of steps between two banks of the
river to cross the river.
A frog wants to cross the river with the condition that he can jump max one
step. Find
@kunal: what is the best way to implement step 2?
On Sat, Aug 13, 2011 at 7:33 PM, Ashish Sachdeva ashish.asachd...@gmail.com
wrote:
@kunal: seems fine.. tried it on some cases...
On Sat, Aug 13, 2011 at 5:17 PM, Kunal Patil kp101...@gmail.com wrote:
Following approach should work:
1)
Hi!
Any good source for dynamic programming problems (along with concept)??
No lmgtfy, Please.
Direct links will be appreciated.
Thanks
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
you can start with this
http://www.topcoder.com/tc?d1=tutorialsd2=dynProgmodule=Static
On Sat, Aug 13, 2011 at 9:31 PM, Yasir yasir@gmail.com wrote:
Hi!
Any good source for dynamic programming problems (along with concept)??
No lmgtfy, Please.
Direct links will be appreciated.
Thanks
@raghavan: can u explain wid an example plz
On Sat, Aug 13, 2011 at 4:11 PM, Raghavan its...@gmail.com wrote:
- Keep an counter for first stuck number(0/1)
- increment it, if you stuck on other number, start decrementing it
- if the counter becomes zero,note that seq
- finally
An array of strings is given and you have to find out whether a circular
chain with all character can be formed or not?
Circular chain is formed in way that: if last char of a string is equal to
first char of another string then it can be joined.:
like ab bxc === axbbxc
@Raghavan,
Thanks man :)
--
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/-/lGIZaHYTu3cJ.
To post to this group, send email to algogeeks@googlegroups.com.
To
my bad only 3,4
On Sat, Aug 13, 2011 at 7:41 PM, rajeev bharshetty rajeevr...@gmail.comwrote:
3,4
On Sat, Aug 13, 2011 at 7:39 PM, Raman raman.u...@gmail.com wrote:
In statement 2, isn't p pointing to const string, as we cannot modify the
characters of the string.
--
You received this
@gaurav: nyc one ;) how u made this one well?
On Sat, Aug 13, 2011 at 6:14 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote:
lol
On Sat, Aug 13, 2011 at 6:12 PM, Gaurav Menghani
gaurav.mengh...@gmail.com wrote:
http://lmgtfy.com/?q=scanf+float+precision+format
On Sat, Aug 13, 2011 at
Me too didn't get Raghavan's algo... Pls explain..
It seems that above algo will find only longest sequence starting from index
0.
Just a thought:
Along with raghavan's algo, what if I keep and
array_of_integers[string_length]
and keep on storing the count in this array.
Once string is
Hey, can anyone pls share logic/pseudo code for N*M?
(When N can be less than or greater than M.)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
**
If you fail to see this message correctly,
copy this link to your browser: http://www.fileflyer.com/view/XyBZGA8
[image: FileFlyer]Store and Send your files, fast!
Hello,
You can click on the following link to retrieve your file.
Algorithms for Interviews _scan
...
if(something)
return true;
else
return false;
.
// few statements here
.
Will few statements ever execute??
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
The soln is nth term of fibonacci sequence...isnt it?
Aseem
On Sat, Aug 13, 2011 at 9:27 PM, Akash Mukherjee akash...@gmail.com wrote:
dp problem, refer to dp from AFI
On Sat, Aug 13, 2011 at 9:01 PM, Decipher ankurseth...@gmail.com wrote:
There is a river and there are n number of
maintain an array indexed on alphabets 'a' to 'z'.
now count the occurence of each character taking *last character* of each
string
{asdsb,csasaa, bc, bc}
in this case
arr[a]=1;
arr[b]=1;
arr[c]=2;
now start with each sting let first character be first and last character be
last
while
Great work aditi. :)
On Sat, Aug 13, 2011 at 10:07 PM, aditi garg aditi.garg.6...@gmail.comwrote:
**
If you fail to see this message correctly,
copy this link to your browser: http://www.fileflyer.com/view/XyBZGA8
[image: FileFlyer] Store and Send your files, fast!
Hello,
You can
why following?
if(first==last)
return false;
example:
axxa, ayyb, bzza === ayybbzzaaxxa
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
yes nth term of fibonacci series.
.t(n)=t(n-1)+t(n-2);
where
t(1)=1;
t(2)=2;
On Sat, Aug 13, 2011 at 10:11 PM, aseem garg ase.as...@gmail.com wrote:
The soln is nth term of fibonacci sequence...isnt it?
Aseem
On Sat, Aug 13, 2011 at 9:27 PM, Akash Mukherjee akash...@gmail.comwrote:
dp
Kudos to Aditi. :D
--
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/-/gnhokgp_zV0J.
To post to this group, send email to algogeeks@googlegroups.com.
To
see the following example:
*a*kdhd*a* ,*b*hdgd*c*, *c*hdjd*b*
On Sat, Aug 13, 2011 at 10:20 PM, Yasir yasir@gmail.com wrote:
why following?
if(first==last)
return false;
example:
axxa, ayyb, bzza === ayybbzzaaxxa
--
You received this message because you are subscribed to the
i got error,my sol will not work for all cases
On Sat, Aug 13, 2011 at 10:22 PM, Kamakshii Aggarwal
kamakshi...@gmail.comwrote:
see the following example:
*a*kdhd*a* ,*b*hdgd*c*, *c*hdjd*b*
On Sat, Aug 13, 2011 at 10:20 PM, Yasir yasir@gmail.com wrote:
why following?
if(first==last)
I dont know whether this is best approach to do step 2 or not. But it's
certainly good.
//I will show for two strings s1 and s2
len1 = s1.length();
len2 = s2.length();
ind1 = 0; //Index in the first string
ind2 = 0; //Index in the second string
while( ind1len1 || ind2 len2 ) //Match until
what is d basic diff between malloc calloc and new command as all are
used for dynamic allocation
--
Warm Regards--
Ankur Pratik
Computer Science Engg Dept
Undergraduate Student
National Institute of Technology
Durgapur
India
--
You received this message because you are subscribed to the
@ kunal : arent we supposed to construct the string fr each number equal to
the max length of any number...
whr r v doing dat chking in dis algo?
On Sat, Aug 13, 2011 at 10:25 PM, Kunal Patil kp101...@gmail.com wrote:
I dont know whether this is best approach to do step 2 or not. But it's
Here is my algo:
1)Replace all '0' with '1' and '1' with '-1'(.i.e, 1 0 1 --- -1 1 -1)
2)Now take an array to calculate the sum of all elements from 1 to that
index, which can be calculated as sum[i]=sum[i-1]+ar[i],take 0th element as
0.
3)Now the problem becomes finding two indices (say i,j)
malloc fr one element only...fr eg new node in linked listgarbage values
assigned
calloc can be used to dynamically allocate memory fr arrays...values
assigned to 0 by default
new same as malloc except dat it is used in c++ and malloc in C
On Sat, Aug 13, 2011 at 10:32 PM, Ankur pratik
i dont think we can set precision during scanf
On Sat, Aug 13, 2011 at 9:49 PM, Anika Jain anika.jai...@gmail.com wrote:
@gaurav: nyc one ;) how u made this one well?
On Sat, Aug 13, 2011 at 6:14 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote:
lol
On Sat, Aug 13, 2011 at 6:12 PM, Gaurav
@Anika: Check out lmgtfy.com
One can use this if the desired answer is provided by a google query.
On Sat, Aug 13, 2011 at 9:49 PM, Anika Jain anika.jai...@gmail.com wrote:
@gaurav: nyc one ;) how u made this one well?
On Sat, Aug 13, 2011 at 6:14 PM, SANDEEP CHUGH sandeep.aa...@gmail.com
How did you know that ?
--
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/-/GMle2k9i73wJ.
To post to this group, send email to algogeeks@googlegroups.com.
To
Maybe you are looking for this:http://www.codechef.com/problems/WORDS1
On Sat, Aug 13, 2011 at 10:25 PM, Kamakshii Aggarwal
kamakshi...@gmail.comwrote:
i got error,my sol will not work for all cases
On Sat, Aug 13, 2011 at 10:22 PM, Kamakshii Aggarwal
kamakshi...@gmail.com wrote:
see the
k lets assume that there are 10 kinds of item in the shop
price[]={10,20,30,40,50,60,70,80,90,100}
quantity[]={5,5,5,5,5,5,5,5,5,5}
say no.of items having some free discounts : 5
say p,q,r denotes buying q nos. of p we will get one r for free.. let them
be
5 4 1
2 5 1
8 2 10
9 1 10
1 5 10
It is just displaying the floating point in the specified precision
format. The internal representation is obviously unchanged.
On Sat, Aug 13, 2011 at 10:44 PM, Prakash D cegprak...@gmail.com wrote:
i dont think we can set precision during scanf
On Sat, Aug 13, 2011 at 9:49 PM, Anika Jain
coz i have tried a similar question like dis...also u can check it also...
On Sat, Aug 13, 2011 at 10:47 PM, Decipher ankurseth...@gmail.com wrote:
How did you know that ?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this
i just used that statement and cout it.. i got junk value..
what is the input format for this?
On Aug 13, 10:18 pm, Gaurav Menghani gaurav.mengh...@gmail.com
wrote:
It is just displaying the floating point in the specified precision
format. The internal representation is obviously unchanged.
I can only say that above code is wrong, check this code of mine, I
have tested more cases and all are working,
https://ideone.com/pEBs8
see if you can find any bug in this one .
thanks.
On Sat, Aug 13, 2011 at 8:03 PM, WgpShashank shashank7andr...@gmail.com wrote:
@rohit , I think we will get
can anybody please tell me what kind of questions will be asked in
citrix rd???please this is my last chance.help 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
what does step refer to in this case???
Please explain the example...
On Sat, Aug 13, 2011 at 10:47 PM, Decipher ankurseth...@gmail.com wrote:
How did you know that ?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion
ok check this, https://ideone.com/hZboG
there may be bugs in coding, but I'm quite sure that algo is correct
need to check more cases though
but working on all the cases discussed here
is there any proof that greedy won't work in this case?
On Sat, Aug 13, 2011 at 11:03 PM, rohit jangid
Let me clarify.
Lets take example
53
147
1471470
As per algo:
sort 5353535 , 1471471 and 1471470 lexicographically to get answer.
But You are not going to compare all these simultaneously.
Might be you will first compare 53 and 147 for lexicographical order. In
this case you are not required to
The link doesnt seem to work. Can somebody mail it again?
On Sat, Aug 13, 2011 at 10:22 PM, Yasir yasir@gmail.com wrote:
Kudos to Aditi. :D
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
It does work!
--
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
see WgpShashank second point carefully
it say successor is parent of left node
so solution of you BST is parent of 2 which is 4
On Sat, Aug 13, 2011 at 7:50 PM, Anika Jain anika.jai...@gmail.com wrote:
@ashmantak: the figure of dipankar is incorrect but his point is correct..
for a tree like
1 - 100 of 156 matches
Mail list logo