Saturday, July 04, 2009
Awesome day!!!!
Thanks Anshuman, Anirban, Anushray, Amit and Anup for being there and making it so much fun for me!!!!
Sunday, June 28, 2009
Kerala: A short story
A short account of the excellent trip we(Sandesh, Pascal, Barbara and I) had to Kerala(God's own country).
20th June, 2009: Left from Mumbai, Lokmanya Tilak Terminus at 11:40am by Netravati Express. The train journey was essentially uneventful with us eating stuff we had brought from home. We avoided the train food as much as possible since it is known to down your spirits.
21st June, 2009: Anyhow, we couldn't avoid calling for breakfast when an undercooked dossa greeted our bile-infested stomachs and was probably digested. We got off at 2:50pm(the scheduled arrival time for the train.. surprise! surprise! the train was on time!!) at Ernakulam Junction. We did run into some (very little) trouble locating our driver for the trip(Pradeesh), but we eventually did find him. He took us to the first place we were supposed to go to: Kapithan Inn at Kochi. This is a nice home-stay run by a very friendly lady named Pushpa. The time spent there was really nice. We visited the beach, which has fisher-folk that use Chinese Fishing Nets to catch their prey. Kathakali dance performances take place every evening at 7pm. After a nice stroll, we decided to get something to eat. Finding a good eatery wasn't easy, but we did manage to find one called "Elite Inn". The waiter there was really over-worked but was good.... The food was good, and we ate well.
22nd June, 2009: Breakfast was at Elite Inn, and we and headed off to Kumarakom for the House-boat stay in the back waters. This was really the bestest of times we had.... There were 3 people waiting on us, The Chef(Anish), the driver(Meneesh) and the third took over when the driver was tired. Frankly speaking there was nothing to get tired about, but what the heck!! And I guess these guys must be finding it slightly monotonous to do the same thing every time, and greet everyone with the same enthusiasm and show them around.... This however, was a truly amazing experience.... Neither words nor pictures would do justice to what we experienced on the house boat. The back waters are a very still mass of water where the house boat just slithered along beautifully. We had fresh sunari(golden) coconuts and good food all around.
23rd June, 2009: Again, amazing breakfast and a very serene ride back to where we started off. This ended at about 10:00am. From here, we took the car and headed off to Thekkady. This was a slightly tiring and longish drive(about 41/2 hrs). We had stopped at a small place to have some tea. These long drives on hills really get to me cause there are so many sharp turns and when you are turning on these roads, all the food in your stomach starts to move about, and you feel giddy and sleepy. Well, we reached our place of stay -- Cardamom Club. This is another heaven on earth. There are about 4 small cottages on a small hillock over looking a treehouse. Behind the cottages is a hill on which Cardamom Club's plantations reside. The porch(the hillock on which the cottages are) is also filled with cardamon, vanilla and pepper plants. There are also jackfruit, papaya and mango trees here. The staff(Lijo and Shibu) was really co-operative and the food was really awesome! We had mango juice and papaya from fruits that grew in their own plantations. There is a old lady that did the cooking. She had the most amazing smile.... It reminded me of happiness.... :)
24th June, 2009: Went to a spice garden(Deepa Spices). Didn't like it so much. We would recommend other places like Abraham's Spice Garden, which is recommended by Lonely Planet. The one that we went to didn't show us much and the spices there were very highly priced. At 3:30pm we left for a boat ride in the Periyar Wildlife Reserve. We made it _just_ in time for the 4:00pm boat. However, Shibu had already bought tickets for us(you get them an hour before the boat ride) which is why we were able to go. The boat ride was nice.... It reminded Sandesh of scenes from Jurassic park. We didn't see to many wild animals though. We saw cows, bull, deer, pigs and some birds(the name of whom I do not know). The place closes at 6:00pm(which is also when the boat ride ends). We bought some spices after moving about in many shops and retired for the night after dinner.
25th June, 2009: Left for Munnar. Stopped on the way at a Spice Garden that was a home-run place. Really liked this place. Just bought stuff from here. They have the plantation, their home and the factory in one place. They grow their own vegetables to eat as well!! Again, longish drive that I didn't like too much. However, Pascal stopped us on the way and we took a nice 2 hour break at the Kannan Devan tea gardens. We spotted some cow munching grass and not doing much ;-) On reaching Munnar(about 4:30pm) we had lunch at some restaurant. I don't remember the name, but it was alright. We reached the home stay(Aranyaka) at about 5:30pm. It was too late to move out after that because of the mist so we retired for the day. The person who owned and was managing the home stay was a lady named Poornima. The person who was entertaining us was named Suresh.
26th June, 2009: We has good breakfast(tea, toast and omlette) and left at about 9:40am for Mattupatty dam. We thought there would be pedal boating out there, but there was only speed boating there. We were told that this time last year, the water on the dam was 120ft, but this time it was just 60ft, so there had been lesser rainfall this year as compared to last year. We were told that pedal boating would be available at the dam about 10km ahead. This dam is called Kundala Dam. We reached there to find out that we had not been lied to and in fact had pedal boats!! So, we hired them for 30min each(up to 3 ppl. in each pedal boat, but since there were 4 of us, we too 2 each). This was a really nice experience!! There were ducks in the lake too. Halfway, we decided to stay on for 30 min more. We were able to cover the whole lake :) After that, we went to echo point. There was nothing much interesting happening here[interesting incident with Barbara...]. Then we went back to have lunch. We hunted for some nice place and finally settled on Hotel Saravan Bhavan which we thought would be good. And it turned out to be an excellent place to have authentic South-Indian food. We would recommend it to everyone who visits Munnar.
27th June, 2009: We had to start off early(about 8:30am) for Ernakulam Junction since we had a train to catch at 2:15pm. The trip to the station was said to take about 4hrs 30min. We bought halwa, chips and bananas on the way and reached the station just in time(about 15mins to spare).
28th June, 2009: I didn't have any breakfast in the train, but had lunch. They had nice big kerala rice along with sambhar. I was really hungry at that time. When I reached home, I had khari puris, shrikhand, karela ki sabzi(bitter gourd vegetable) and daal(pulses). A truly relished meal!!!! I then topped it off with vanilla flavoured milk that I made with the vanilla that I had brought back from Kerala :) Ah! End of a really nice trip.... :) :)
20th June, 2009: Left from Mumbai, Lokmanya Tilak Terminus at 11:40am by Netravati Express. The train journey was essentially uneventful with us eating stuff we had brought from home. We avoided the train food as much as possible since it is known to down your spirits.
21st June, 2009: Anyhow, we couldn't avoid calling for breakfast when an undercooked dossa greeted our bile-infested stomachs and was probably digested. We got off at 2:50pm(the scheduled arrival time for the train.. surprise! surprise! the train was on time!!) at Ernakulam Junction. We did run into some (very little) trouble locating our driver for the trip(Pradeesh), but we eventually did find him. He took us to the first place we were supposed to go to: Kapithan Inn at Kochi. This is a nice home-stay run by a very friendly lady named Pushpa. The time spent there was really nice. We visited the beach, which has fisher-folk that use Chinese Fishing Nets to catch their prey. Kathakali dance performances take place every evening at 7pm. After a nice stroll, we decided to get something to eat. Finding a good eatery wasn't easy, but we did manage to find one called "Elite Inn". The waiter there was really over-worked but was good.... The food was good, and we ate well.
22nd June, 2009: Breakfast was at Elite Inn, and we and headed off to Kumarakom for the House-boat stay in the back waters. This was really the bestest of times we had.... There were 3 people waiting on us, The Chef(Anish), the driver(Meneesh) and the third took over when the driver was tired. Frankly speaking there was nothing to get tired about, but what the heck!! And I guess these guys must be finding it slightly monotonous to do the same thing every time, and greet everyone with the same enthusiasm and show them around.... This however, was a truly amazing experience.... Neither words nor pictures would do justice to what we experienced on the house boat. The back waters are a very still mass of water where the house boat just slithered along beautifully. We had fresh sunari(golden) coconuts and good food all around.
23rd June, 2009: Again, amazing breakfast and a very serene ride back to where we started off. This ended at about 10:00am. From here, we took the car and headed off to Thekkady. This was a slightly tiring and longish drive(about 41/2 hrs). We had stopped at a small place to have some tea. These long drives on hills really get to me cause there are so many sharp turns and when you are turning on these roads, all the food in your stomach starts to move about, and you feel giddy and sleepy. Well, we reached our place of stay -- Cardamom Club. This is another heaven on earth. There are about 4 small cottages on a small hillock over looking a treehouse. Behind the cottages is a hill on which Cardamom Club's plantations reside. The porch(the hillock on which the cottages are) is also filled with cardamon, vanilla and pepper plants. There are also jackfruit, papaya and mango trees here. The staff(Lijo and Shibu) was really co-operative and the food was really awesome! We had mango juice and papaya from fruits that grew in their own plantations. There is a old lady that did the cooking. She had the most amazing smile.... It reminded me of happiness.... :)
24th June, 2009: Went to a spice garden(Deepa Spices). Didn't like it so much. We would recommend other places like Abraham's Spice Garden, which is recommended by Lonely Planet. The one that we went to didn't show us much and the spices there were very highly priced. At 3:30pm we left for a boat ride in the Periyar Wildlife Reserve. We made it _just_ in time for the 4:00pm boat. However, Shibu had already bought tickets for us(you get them an hour before the boat ride) which is why we were able to go. The boat ride was nice.... It reminded Sandesh of scenes from Jurassic park. We didn't see to many wild animals though. We saw cows, bull, deer, pigs and some birds(the name of whom I do not know). The place closes at 6:00pm(which is also when the boat ride ends). We bought some spices after moving about in many shops and retired for the night after dinner.
25th June, 2009: Left for Munnar. Stopped on the way at a Spice Garden that was a home-run place. Really liked this place. Just bought stuff from here. They have the plantation, their home and the factory in one place. They grow their own vegetables to eat as well!! Again, longish drive that I didn't like too much. However, Pascal stopped us on the way and we took a nice 2 hour break at the Kannan Devan tea gardens. We spotted some cow munching grass and not doing much ;-) On reaching Munnar(about 4:30pm) we had lunch at some restaurant. I don't remember the name, but it was alright. We reached the home stay(Aranyaka) at about 5:30pm. It was too late to move out after that because of the mist so we retired for the day. The person who owned and was managing the home stay was a lady named Poornima. The person who was entertaining us was named Suresh.
26th June, 2009: We has good breakfast(tea, toast and omlette) and left at about 9:40am for Mattupatty dam. We thought there would be pedal boating out there, but there was only speed boating there. We were told that this time last year, the water on the dam was 120ft, but this time it was just 60ft, so there had been lesser rainfall this year as compared to last year. We were told that pedal boating would be available at the dam about 10km ahead. This dam is called Kundala Dam. We reached there to find out that we had not been lied to and in fact had pedal boats!! So, we hired them for 30min each(up to 3 ppl. in each pedal boat, but since there were 4 of us, we too 2 each). This was a really nice experience!! There were ducks in the lake too. Halfway, we decided to stay on for 30 min more. We were able to cover the whole lake :) After that, we went to echo point. There was nothing much interesting happening here[interesting incident with Barbara...]. Then we went back to have lunch. We hunted for some nice place and finally settled on Hotel Saravan Bhavan which we thought would be good. And it turned out to be an excellent place to have authentic South-Indian food. We would recommend it to everyone who visits Munnar.
27th June, 2009: We had to start off early(about 8:30am) for Ernakulam Junction since we had a train to catch at 2:15pm. The trip to the station was said to take about 4hrs 30min. We bought halwa, chips and bananas on the way and reached the station just in time(about 15mins to spare).
28th June, 2009: I didn't have any breakfast in the train, but had lunch. They had nice big kerala rice along with sambhar. I was really hungry at that time. When I reached home, I had khari puris, shrikhand, karela ki sabzi(bitter gourd vegetable) and daal(pulses). A truly relished meal!!!! I then topped it off with vanilla flavoured milk that I made with the vanilla that I had brought back from Kerala :) Ah! End of a really nice trip.... :) :)
Tuesday, May 12, 2009
Longest Common Increasing Subsequence
I recently came across the problem of computing the Longest Common Increasing Subsequence(LCIS) of 2 given sequences. What does LCIS mean? Given 2 sequences of integers, we need to find a longest sub-sequence which is common to both the sequences, and the numbers of such a sub-sequence are in strictly increasing order.
So for example, given the 2 sequences:
- 4,3,5,6,7,1,2 and
- 1,2,3,50,6,4,7
Possible common increasing sub-sequence of the 2 sequences above are:
(4), (3), (7), (6), (1), (2), (1,2), (3,6), (3,7), (6,7), (4,7) and (3,6,7).
The LCIS of the 2 sequences would be (3,6,7). It so happens that the 2 sequences above have a unique LCIS, though that may not always be the case.
Now, how do we go about computing the LCIS of 2 sequences in a reasonable amount of time? If we think a bit, we can come up with the recurrence:
LCIS_length(seq1, seq2, prev_elem) is equal to:
- MAX(LCIS_length(seq1 less it's first element, seq2 less it's first element, first element of seq1)+1,
LCIS_length(seq1 less it's first element, seq2, prev_elem),
LCIS_length(seq1, seq2 less it's first element, prev_elem)).
If the first elements of seq1 and seq2 are the same AND the first element of seq1 is > prev_elem. - MAX(LCIS_length(seq1 less it's first element, seq2, prev_elem),
LCIS_length(seq1, seq2 less it's first element, prev_elem)).
If the first elements of seq1 and seq2 are different.
Now, if we implement it just the way it is, it is going to be quite expensive to compute the LCIS_length for any sequence having a length of more than say 20 elements. So, we want to use an approach which would work for larger input. On further thinking, we think that a faster(polynomial time) approach is possible.
Let's lay out both the sequences along the first row and column of an nXm matrix, where n and m are the lengths of the 2 sequences given.
| 4 | 3 | 5 | 6 | 7 | 1 | 2 | |
| 1 | |||||||
| 2 | |||||||
| 3 | |||||||
| 50 | |||||||
| 6 | |||||||
| 4 | |||||||
| 7 |
Let's define each cell to hold the length of the LCIS ending at the row(or column) that that cell is defining. For example, cell [6,1] will hold the length of the LCIS that ends with the number 4. The cell [5,2] will not hold any meaningful value since there can be no sub-sequence that ends with both 6 and 3. Similarly, the cell [7,5] will hold the length of an LCIS that ends with the number 7.
What we will do is we run 2 for loops, one for the row and one for the column, and each time we find a match between an element in the top row and the left column(i.e. The input elements), we will try and find some sub-sequence computed till now that can be extended by the number that that cell represents.
It should be clear by now that the number that the cell [x,y] represents is the number in the first column in the row 'x' OR the number in the first row in column 'y' ONLY IF both these numbers are the same. For example, the cell [2,3] can NOT represent any number, whereas the cell [3,2] represents the number 3.
A sub-sequence that can be extended by a number in cell [x,y] will always lie in the matrix of which the cell [x-1,y-1] is the right-bottom most cell. Let is refer to such a matrix as the candidate matrix for cell [x,y]. For example, we have highlighted all the cells which can have potential candidate sub-sequences that can be extended by the cell [5,4](which represents the number 6).
| 4 | 3 | 5 | 6 | 7 | 1 | 2 | |
| 1 | |||||||
| 2 | |||||||
| 3 | |||||||
| 50 | |||||||
| 6 | |||||||
| 4 | |||||||
| 7 |
Let's start working out a solution row-by-row.
We need to remember that while processing the 1st row, there is NO sub-sequence that can be extended by any sub-sequence that ends with a number in the first row! This would be the situation after we finished processing the first row.
| 4 | 3 | 5 | 6 | 7 | 1 | 2 | |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 2 | |||||||
| 3 | |||||||
| 50 | |||||||
| 6 | |||||||
| 4 | |||||||
| 7 |
When processing further rows, we check the candidate matrix of each cell being processed, and always extend the LCIS in the candidate matrix that ends with a number less than the representative number of the cell being processed.
When processing the 2nd row, we notice that a sub-sequence ending at 2 can extend a subsequence ending at 1 because that sub-sequence is the LCIS that ends with a number less than 2 and lies in the candidate matrix for the cell [2,7].
| 4 | 3 | 5 | 6 | 7 | 1 | 2 | |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
| 3 | |||||||
| 50 | |||||||
| 6 | |||||||
| 4 | |||||||
| 7 |
Similarly, after processing all the rows, our matrix looks like this.
| 4 | 3 | 5 | 6 | 7 | 1 | 2 | |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
| 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 50 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 6 | 0 | 0 | 0 | 2 | 0 | 0 | 0 |
| 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 7 | 0 | 0 | 0 | 0 | 3 | 0 | 0 |
To find the LCIS, we search for the largest number in the matrix, and that gives you the length of the LCIS and also the number at which such an LCIS ends. To trace the LCIS, we need to find the largest number that lies in the candidate matrix of the cell to which this largest number belongs. In the figure below, the cell and candidate matrix have been highlighted in green and yellow colours respectively.
| 4 | 3 | 5 | 6 | 7 | 1 | 2 | |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
| 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 50 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 6 | 0 | 0 | 0 | 2 | 0 | 0 | 0 |
| 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 7 | 0 | 0 | 0 | 0 | 3 | 0 | 0 |
Tracing thus, we land up with 3 cells(marked in green).
| 4 | 3 | 5 | 6 | 7 | 1 | 2 | |
| 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
| 3 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 50 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 6 | 0 | 0 | 0 | 2 | 0 | 0 | 0 |
| 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 7 | 0 | 0 | 0 | 0 | 3 | 0 | 0 |
The LCIS is just the numbers represented by the cells marked in green, when taken in increasing order of their value. i.e. (3,6,7).
The complexity of the approach presented above is O(n4). Can we bring it down?
If you notice, you will see that for each index representing numbers in the top most row, there is a unique integer associated with it. For example, indexes 1,2,3,4 are associated with numbers 4,3,5,6. There is always one integer associated with every such index. If we think a bit, it should be clear that whenever a CIS ends at some such index, and another longer CIS also ends at that index, then it is sufficient to just keep the larger of the 2. This is because the way in which we are processing the input(row-wise) allows us to track just the LCIS ending at any index.
If we adopt such an approach and use an auxiliary array to hold the LCIS ending at every such index, we land up with an O(n3) solution since we now need to scan just a single array for every element instead of an entire matrix.
However, if we think a little bit more, we can see that we don't even need that scan, since we can always maintain(for every row scanned), a single variable holding the length of the LCIS that the number(N) in the first column of that row can extend. Whenever we encounter a cell which has the same representative number(N), we store a number one more than an LCIS that can be extended by this representative number of such a cell. This brings down the complexity further to O(n2).
Re-constructing the LCIS can be trivially accomplished in time O(n) if we use extra space to the order of O(n2) and this is left as an exercise for the reader.
Sunday, April 12, 2009
Effective Delegation
I realise that one thing I need to learn, and learn fast is how to effectively delegate responsibilities to others. It is truly an art. How to pick someone for a task such that the probability of it's successful completion are upped significantly. Firstly, I think I need to be confident that I can trust someone with a certain task, and once that is done, how to choose that someone such that there is enough internal motivation for that person to run that task to completion.
Delegation solves a lot of problems if done well.
Some questions:
[1] What to delegate.
[2] When to delegate.
[3] Whom to delegate to.
[4] How much to delegate.
[5] How to create/detect internal motivation for effective delegation.
Delegation solves a lot of problems if done well.
Some questions:
[1] What to delegate.
[2] When to delegate.
[3] Whom to delegate to.
[4] How much to delegate.
[5] How to create/detect internal motivation for effective delegation.
Wednesday, February 04, 2009
The Ticking
Often have I seen this line
That people are a slave to time
and when hey miss their train divine
they seldom cry but often whine
But they will when they think it fine
wait outside a royal dine.
And in the morn, when they do tick
get up they will very slick
for when they hit the ticking clock
like the feathers they will flock.
If at the time their path you block
won't they spare a living stock
and ruthlessly they will knock
for they fear the dreaded dock.
Nature hath it's living foes
and friends they o become galore
When they adorn their pretty robes
That do negate it's wily woes.
That people are a slave to time
and when hey miss their train divine
they seldom cry but often whine
But they will when they think it fine
wait outside a royal dine.
And in the morn, when they do tick
get up they will very slick
for when they hit the ticking clock
like the feathers they will flock.
If at the time their path you block
won't they spare a living stock
and ruthlessly they will knock
for they fear the dreaded dock.
Nature hath it's living foes
and friends they o become galore
When they adorn their pretty robes
That do negate it's wily woes.
Tuesday, January 13, 2009
GIGO
Sometimes, the the title of a post doesn't quite describe what the post is all about. I think this post is a classic case of the above.
I'll try to keep it as simple as possible.
Suppose you are writing a program to compute the factorial of a number, you would also add a function to find if a string is a substring of another string, or check if a string is a palindrome? If you answer "yes" to any of the above questions, I would surely like to see you actively use the above in your program. For the rest of you un-interesting lot(Rule:0 of blogging; never lower the self-esteem of your readers), I would like to ask you if you would eat a packet of biscuits just because it was available for free. I'm guessing you wouldn't eat anything unless you were hungry, and if you consider biscuits as not belonging to the class of "healthy foods", you probably wouldn't eat those as well.
I'll try to keep it as simple as possible.
Suppose you are writing a program to compute the factorial of a number, you would also add a function to find if a string is a substring of another string, or check if a string is a palindrome? If you answer "yes" to any of the above questions, I would surely like to see you actively use the above in your program. For the rest of you un-interesting lot(Rule:0 of blogging; never lower the self-esteem of your readers), I would like to ask you if you would eat a packet of biscuits just because it was available for free. I'm guessing you wouldn't eat anything unless you were hungry, and if you consider biscuits as not belonging to the class of "healthy foods", you probably wouldn't eat those as well.
Friday, January 09, 2009
Maximum Atiguous Sum of a Sequence(Array)
Let me first explain what the question is.
Given an array(a sequence of non-negative integers), we need to find that subsequence of this sequence such that:
1. No element in the subsequence is adjacent to any other element in that subsequence in the original array(atiguous).
2. The sum of the elements of this subsequence is the maximum for any subsequence of the array which satisfies (1).
I was asked this question in an interview but was able to come up only with a very inefficient solution for it. That solution consisted of enumerting all possible subsequences which satisfied (1) and find the one that gave the maximum sum. Only after a week did I come up with a solution that is Linear in complexity, and examines each element of the array just once.
I present it below and leave it up to the reader to modify the solution so that it works for negative integers as well. Hint: In case all the numbers are negative, the solution will contain no elements and the value of the maximum atiguous sum will be zero(0).
But before I present the solution, let me discuss how I got to it.
For the longest time, i was under the impression that the only solution that could exists would be the one that consisted of enumerating all sets with atiguous elements. However, on thinking more on it, it seemed that the solution could be improved because if you see, you must choose 2 out of every 4 contiguous elements, whatever way you look at it. Also, you may choose 1 or 2 out of 3 contiguous elements. Similarly, you could choose 0 or 1 out of 2 continuous elements. This means that in the worst case we will have a solution consisting of abs(N/2) elements for a sequence of N elements, and in the best case we have a solution consisting of abs((N+1)/2) elements.
If you solve this problem using the enumeration method, but continuously adding elements to a smaller sub-sequence, you will notice that the best solution involves choosing either the sum 2 elements later or the sum 3 elements later; adding it to the current element, and saving the maximum of these 2 values as the maximum sum up to the current element with the current element as a constituent. At the end of this exercise, the final solution is the maximum of the 1st or 2nd element(considering that we are working backwards).
Update (22/06/2010): This is probably the first and last time I hope to write Java code. Such a verbose and ungainly language have I never seen.
Given an array(a sequence of non-negative integers), we need to find that subsequence of this sequence such that:
1. No element in the subsequence is adjacent to any other element in that subsequence in the original array(atiguous).
2. The sum of the elements of this subsequence is the maximum for any subsequence of the array which satisfies (1).
I was asked this question in an interview but was able to come up only with a very inefficient solution for it. That solution consisted of enumerting all possible subsequences which satisfied (1) and find the one that gave the maximum sum. Only after a week did I come up with a solution that is Linear in complexity, and examines each element of the array just once.
I present it below and leave it up to the reader to modify the solution so that it works for negative integers as well. Hint: In case all the numbers are negative, the solution will contain no elements and the value of the maximum atiguous sum will be zero(0).
But before I present the solution, let me discuss how I got to it.
For the longest time, i was under the impression that the only solution that could exists would be the one that consisted of enumerating all sets with atiguous elements. However, on thinking more on it, it seemed that the solution could be improved because if you see, you must choose 2 out of every 4 contiguous elements, whatever way you look at it. Also, you may choose 1 or 2 out of 3 contiguous elements. Similarly, you could choose 0 or 1 out of 2 continuous elements. This means that in the worst case we will have a solution consisting of abs(N/2) elements for a sequence of N elements, and in the best case we have a solution consisting of abs((N+1)/2) elements.
If you solve this problem using the enumeration method, but continuously adding elements to a smaller sub-sequence, you will notice that the best solution involves choosing either the sum 2 elements later or the sum 3 elements later; adding it to the current element, and saving the maximum of these 2 values as the maximum sum up to the current element with the current element as a constituent. At the end of this exercise, the final solution is the maximum of the 1st or 2nd element(considering that we are working backwards).
import java.util.*;
public class MaxAtigSum {
static private Vector
getIntegers()
{
Vectorret = new Vector ();
Scanner sin = new Scanner(System.in);
while (sin.hasNextInt())
{
Integer val = sin.nextInt();
ret.add(val);
}
return ret;
}
public static void main(String[ ] args)
{
Vectorints = getIntegers();
Vectorsoln = new Vector ();
// Pad the array with 3 integers more than the ints array.
System.out.println("Size of input: " + ints.size());
for (int i = 0; i < ints.size() + 3; ++i)
{
soln.add(0);
}
for (int i = soln.size() - 4; i >= 0; --i)
{
soln.set(i, ints.get(i) + Math.max(soln.get(i+2), soln.get(i+3)));
}
System.out.println("The maximum atiguous sum is: " + Math.max(soln.get(0), soln.get(1)));
}
}
Update (22/06/2010): This is probably the first and last time I hope to write Java code. Such a verbose and ungainly language have I never seen.
Sunday, November 30, 2008
Marketing; the 8th sin?
Did you ever notice how people when the see advertisements tend to either:
1. Believe everything that's shown or
2. Believe only part of what is shown.
Well, I think this has to do with the fact that advertisers tend to (un)intentionally blur the facts to promote their products. I say that because it is not always don't intentionally, but sometimes, it is because of difference of opinion between individuals. Besides the utility of a certain product/feature, is entirely subjective and depends on the individual under question.
I think we sometimes wrongly blame marketing people for their (mis)doings, but I do believe that they need to get their act together and try and stay as close to reality as possible.
The thing with ads is that you can't have an enticing ad that is just factual. It needs to have some sort of feeling or direction to it and that isn't achievable by just spitting out the facts. People sometimes need to be told what use a toothbrush would be to them. You can't just highlight the features of a toothbrush without moping around the teeth, gums and bacteria aspect.
I think advertising will really come of age when advertisers learn to maintain the right balance.
1. Believe everything that's shown or
2. Believe only part of what is shown.
Well, I think this has to do with the fact that advertisers tend to (un)intentionally blur the facts to promote their products. I say that because it is not always don't intentionally, but sometimes, it is because of difference of opinion between individuals. Besides the utility of a certain product/feature, is entirely subjective and depends on the individual under question.
I think we sometimes wrongly blame marketing people for their (mis)doings, but I do believe that they need to get their act together and try and stay as close to reality as possible.
The thing with ads is that you can't have an enticing ad that is just factual. It needs to have some sort of feeling or direction to it and that isn't achievable by just spitting out the facts. People sometimes need to be told what use a toothbrush would be to them. You can't just highlight the features of a toothbrush without moping around the teeth, gums and bacteria aspect.
I think advertising will really come of age when advertisers learn to maintain the right balance.
Tnirwahtg gogole's ad "feraute"
I was tihnnikg auobt goolge and all the ad ruenvee it geaenerts and
all the ixndees it mannitias and all our dtaa taht it ixndees and
mekas alabalive for popele to secrah and fnid. Waht if "what if" I had
this piece of data taht I didn't wnat any srcaeh eignne to be able to
unrntesdad and yet allow poelpe to be albe to read. No ads geeaetrnd
besad on the cnentot, but yet ppeole can raed it. Iesrriceptve of the
robots.txt file, the data souhld NOT be ietpntrered in a viald faoihsn
by mniehcas. Mybae tihs isn't a lnog trem sooutiln, but it sure wroks
for now! Now only if I can find a vliad use for it :-p
If you wnat the spcrit, send me an eiaml at "dhruv \bbird@" + "google"[0] + "mail.com"
all the ixndees it mannitias and all our dtaa taht it ixndees and
mekas alabalive for popele to secrah and fnid. Waht if "what if" I had
this piece of data taht I didn't wnat any srcaeh eignne to be able to
unrntesdad and yet allow poelpe to be albe to read. No ads geeaetrnd
besad on the cnentot, but yet ppeole can raed it. Iesrriceptve of the
robots.txt file, the data souhld NOT be ietpntrered in a viald faoihsn
by mniehcas. Mybae tihs isn't a lnog trem sooutiln, but it sure wroks
for now! Now only if I can find a vliad use for it :-p
If you wnat the spcrit, send me an eiaml at "dhruv \bbird@" + "google"[0] + "mail.com"
Sunday, November 09, 2008
Mummy's "Jeeradu" masala
"Jeeradu" is a masala that we use to flavour our buttermilk and lemon juice. You can add it as-is to buttermilk and optionally sweeten it with sugar. You can also add this masala to a glass of lime juice along with sugar and optionally some salt to get a refreshingly fresh drink!
Mix up all the above ingredients well, and use about 1/2tsp per cup of the drink required!
| Jeera(Cumin seed) powder: | 1 unit |
| Dry Ginger powder(Soonth): | 1 unit |
| Black(Rock) salt powder: | 3/4th unit |
| Table salt powder: | 1/2 unit |
Mix up all the above ingredients well, and use about 1/2tsp per cup of the drink required!
Nani's Chai Masala
This is the recipe for the chai masala that makes my chai what it is! It has been passed on to my mother from her mother(my nani) and now to me....
Ingredients:
1 cup is 240ml.
1 Tbsp is 15ml.
I grind the cardamom along with their skin. This adds taste and also saves a lot of effort!
Just mix up all the powders given above well and use it in you tea. Approximately 1/4th tsp. for 2 cups is what I use. You can always experiment and find out what works best for you!
Ingredients:
| Cinnamon Powder: | 3/4th Tbsp. |
| Clove Powder: | 1/2 cup |
| Black Peppercorn Powder: | 1 cup -(minus) 1 Tbsp. |
| Cardamom Powder: | 3/5th Cup(60% of a cup) |
| Ginger Powder(Soonth): | 2 cups |
1 cup is 240ml.
1 Tbsp is 15ml.
I grind the cardamom along with their skin. This adds taste and also saves a lot of effort!
Just mix up all the powders given above well and use it in you tea. Approximately 1/4th tsp. for 2 cups is what I use. You can always experiment and find out what works best for you!
Wednesday, November 05, 2008
Dadi's Rava Sheera
This is a sheera which I can never get enough of. Every time my Granny(Dadi) makes it, I am the first person to have it hot and fresh, and I have about 10 pieces in the average on the first harvest ;-)
I saw her making it once, and here is the recipe for this mouth-watering dish....
Ingredients:
Procedure:
I saw her making it once, and here is the recipe for this mouth-watering dish....
Ingredients:
| Rava(Semolina): | 1 cup |
| Cow's Ghee(Clarified Butter): | 1/2 - 1/3 cup |
| Sultanas(Raisins): | 20 - 25 nos. |
| Boiling Water: | 3 cups |
| Powdered Kesar: | 1/2 tsp |
| Grain Sugar: | 1 1/4 cup |
| Nutmeg(jaifad) powder: | 1/8 tsp |
| Cardamom(elaichi) powder: | 1/2 tsp |
| Badam &Pista powder: | 1 Tbsp |
Procedure:
- On a medium-low flame, heat the ghee, and when a little hot, add the rava.
- Boil 3 cups of water
- When the Ghee starts separating from the mixture, reduce the flame to low &add sultanas. Keep stirring till the sultanas swell up by soaking the Ghee.
- Add boiling water in 3 additions in intervals of 15-20 sec, stirring all the time.
- After a while, the mixture in the pan will stop sticking to the pan. Cook for 30 sec. more and add all the sugar.
- Increase the flame's intensity to medium, stirring all the while.
- When the sugar has dissolved and the water of crystallization has left the sugar, add the powdered saffron to ensure that it is distributed evenly across the product.
- When the mixture in the pan has completely left the pan and is very easy to stir, reduce the flame's intensity again to low.
- Add nutmeg powder and cardamom powder.
- Quickly put the mixture into the settling vessel(typically a thaali or a steel box) and sprinkle the shopped nuts all over. Do NOT press the top of the sheera.
- Let the sheera cool. You can cut it into pieces when warm and enjoy it the most right now!
Sujata's Elaichi Nankhatai
I had been searching for a good nankhatai product/recipe but hadn't been able to find one even after trying out many different recipes. I used to always compare it to nankhatai I had had at my nana's place, and none of them would live up to that standard. So, this time I decided to ask my mami, Sujata for the recipe. Here it is in it's unmodified form, and is makes really excellent elaichi nankhatai!
Ingredients:
Procedure:
Ingredients:
| All-purpose flour(Maida): | 1 1/2 cups(170g) |
| Gram flour(besan): | 1/2 cup(45g) |
| Powdered sugar: | 1 cup + 2 Tbsp(175g) |
| Cow's Ghee(Clarified Butter): | 1 cup minus 2 Tbsp = about 210 ml |
| Powdered cardamom: | 1/2 tsp |
| Vanilla extract/essence: | 1 tsp |
Procedure:
- Preheat the oven to 145°C - 150°C. If it is not baked at this temp, then the gram flour(chickpea) will remain uncooked. If you bake it at a greater temperature, then the chickpea will get burnt(overcooked)!
- Mix the maida, besan and elaichi(cardamom) powder well with a spoon for about 5 mins.
- Cream the Ghee and sugar just until they are mixed well.
- Add the flour mixture to the creamed mixture and mix using a wooden spoon or a spatula.
- Lightly knead into a smooth dough.
- Make small roundlets, place on the baking sheet and make a design on top with a fork. Or you could place a single charoli nut on each roundlet.
- Bake for 30 mins or less(till done). The cookies will feel silky smooth and the flour will peel off from the sided, but they are actually done.
- Cool and enjoy!
Dhruv's favourite Mava Cake!!!!
This is a cake that I truly relish and enjoy and I make using my own method. Since I love the cake and other people have also appreciated it, I feel like sharing the recipe....
Ingredients:
You will also need a pan that is 25 sq. inches in area and at least 2 inches tall. I use a 7.3" X 3.5" X 4" bread tin.
Procedure:
Ingredients:
| Maida(all purpose flour): | 80 g |
| Mava(grated): | 40 g |
| Grain sugar: | 115g |
| Cardamom powder: | 1/2 tsp |
| Powdered Saffron: | 1/4 tsp |
| Vanilla essence: | 1/4 tsp |
| Eggs: | 2 nos. |
| Baking powder: | 1/4 tsp |
| Hot Water: | 2 1/2 Tbsp |
| Powdered dry fruits(pista and badam): | 2 Tbsp |
| Melted butter(salted): | 50 g |
| Vegetable Oil: | 3 Tbsp |
You will also need a pan that is 25 sq. inches in area and at least 2 inches tall. I use a 7.3" X 3.5" X 4" bread tin.
Procedure:
- To prepare the pan, grease the pan, line it with parchment paper and then grease it again.
- Preheat your oven to 180°C.
- Mix the grated mava, flour, cardamom powder and paking powder very well with a spoon. Stir well for 5 mins to mix.
- Take the sugar in a bowl and break the 2 eggs in it.
- Mix the melted butter and oil in a separate vessel.
- Warm the saffron strands and grind into a powder.
- Add the powdered saffron to the butter & oil mixture and mix well.
- Heat 2 cups of water to a boil and turn off the flame. Set the egg container over boiling water(do not touch the base of the container to the water) and beat well till stiff peaks form.
- Add the vanilla essence and beat a little more.
- Add the 3 Tbsp of Hot water to the beaten eggs.
- Add about 3 Tbsp of flour mixture to the well beaten eggs and mix by stirring at the base. Take care NOT to over-mix or you will deflate the batter.
- Add the melted butter & oil mixture. Mix a little.
- Add the remaining flour and the powdered nuts and mix in using the same procedure taking care not to over-mix and deflate the batter. Work in small but quick strokes.
- Pour the batter into the pan and bake for about 50 mins. or till the cake is done. Test with either a toothpick or by touching the surface of the cake. A toothpick inserted should come out clean, or the surface should feel done(spongy, but not soft).
Tuesday, November 04, 2008
Mom's Gujarati Kadhi
This is the recipe for Gujarati Kadhi; the way my mom makes it. I have started liking this dish off late. Kadhi is usually accompanied by Khidchi but we have it as-is or with Steamed Rice or Steamed Jeera Rice.
Ingredients:
Procedure:
Ingredients:
| Green Chillies: | 2, sliced lengthwise and de-seeded |
| Dahi: | 1 - 1 1/2 cups |
| Besan(Gram Flour): | 2 - 3 Tbsp |
| Ginger Paste: | 2 tsp |
| Kadi Patta: | Leaves of 4-5 sticks |
| Water: | (1/2 + 1/2 + 3) cups = 4 cups(960 ml) |
| Jeera(Cumin Seeds): | 2 tsp |
| Vegetable Oil(or Butter or Ghee): | 1 1/2 Tbsp |
| Hing(Compounded Asafoetida) powder: | 1/2 tsp |
| Salt: | To taste(or 3/4 - 1 tsp) |
| Jaggery: | 2 - 2 1/2 Tbsp |
| Fresh Corriander leaves: | A fistful(for seasoning) |
| Sugar: | 1 1/2 tsp |
Procedure:
- Add Besan to dahi. Add ginger paste to it.
- Add 1/2 cup water to the above mixture and it in mix with a mandhiani(apparatus used to make buttermilk from curds). When mixed well, add remaining water and wash the mandhiani.
- Saute chillies, kadi patta, hing and jeera in the oil.
- Make sure gas is on medium.
- Add the flour & curds liquid to the above and add the remaining water to it to adjust the kadhi's consistency. The mixture will thicken on cooking because of the gram flour(besan). Keep stirring the mixture to prevent sticking at the base.
- When the kadhi starts to boil, reduce the flame to slow and keep cooking for about 20 mins more. It is done when kadhi doesn't spill over when the flame's intensity in increased. Cook it sufficiently well or else kadhi will remain uncooked and will taste bad.
- Now, add the jaggery to it and stir in till dissolved. Add jaggery ONLY after the besan is cooked well.
- Add sugar to taste.
- Serve and enjoy!
Monday, September 22, 2008
Better than Kayani Shrewsbury Biscuits
After trying out many recipes and buying Shrewsbury biscuits from many more bakeries and shops, I have finally found a recipe that not only matches the Kayani Shrewsbury biscuits, but I would venture out to say "results in biscuits that are tastier than the ones at Kayani!!!!"

Here we go:
Ingredients:
o 100g Powder sugar(you can grind grain sugar for 5-10 sec to get this)
o 150g Pure salted Butter(I use Amul)
o 200g Refined flour(also called Maida or All-Purpose Flour)
Procedure:
1. Pre-heat the oven to 150°C.
2. Start off with butter right from the refrigerator and cream it till it is not solid.
3. Cream the butter and sugar just until the sugar is mixed with the butter.
4. Add the flour in one go, and use a cut & fold motion of the spatula to incorporate the flour.
5. Refrigerate for 5-10 min if the dough is oozing with butter.
6. Lightly knead the dough to form a smooth dough.
7. Refrigerate again if required.
8. Make about 24 equal sized balls and place them on a baking tray.
9. Flatten out just a little bit with a fork to form a "peda" like ball.
10. Place in pre-heated oven for 30 mins.
11. Enjoy!!!!

Here we go:
Ingredients:
o 100g Powder sugar(you can grind grain sugar for 5-10 sec to get this)
o 150g Pure salted Butter(I use Amul)
o 200g Refined flour(also called Maida or All-Purpose Flour)
Procedure:
1. Pre-heat the oven to 150°C.
2. Start off with butter right from the refrigerator and cream it till it is not solid.
3. Cream the butter and sugar just until the sugar is mixed with the butter.
4. Add the flour in one go, and use a cut & fold motion of the spatula to incorporate the flour.
5. Refrigerate for 5-10 min if the dough is oozing with butter.
6. Lightly knead the dough to form a smooth dough.
7. Refrigerate again if required.
8. Make about 24 equal sized balls and place them on a baking tray.
9. Flatten out just a little bit with a fork to form a "peda" like ball.
10. Place in pre-heated oven for 30 mins.
11. Enjoy!!!!
Tuesday, September 16, 2008
(For me,) Culture is:
unsaid, unspoken
questioned and found to be true
using makkhan and ghee
fresh garam masala
learning from mother
not a photograph
unexpressable, undescribable
knowing how to feed your baby
years of experimentation and knowledge
bundled into a neat package
more trustworthy than science at times
discovering the known
respecting your elders
a series of mutations
a never-ending process
something that transcends education but is akin to it
indestructible
being misunderstood by people today
underrated
taken too literally
knowing what nani used to make for mummy
using a mortar and pestle
more than The Flintstones
older than The Flintstones
not just a chapter in history, but my extended past
mine to give to the future
For me, culture is what it is....
questioned and found to be true
using makkhan and ghee
fresh garam masala
learning from mother
not a photograph
unexpressable, undescribable
knowing how to feed your baby
years of experimentation and knowledge
bundled into a neat package
more trustworthy than science at times
discovering the known
respecting your elders
a series of mutations
a never-ending process
something that transcends education but is akin to it
indestructible
being misunderstood by people today
underrated
taken too literally
knowing what nani used to make for mummy
using a mortar and pestle
more than The Flintstones
older than The Flintstones
not just a chapter in history, but my extended past
mine to give to the future
For me, culture is what it is....
Wednesday, September 03, 2008
About Yeast.
I was baking a loaf of bread, and for some reason, it didn't turn out as voluminous as it should have, so I decided to investigate what the problem was. The 2 loaves I had baked earlier too were not quite up to the mark so my suspicion fell on the yeast that I was using. I use fresh baker's/cake yeast, and it goes bad really fast. It has a refrigerated shelf life of about 3 weeks, but I had stored it in the deep freezer so that it was stored frozen. Baker's yeast can be stored frozen up to 6 months. The yeast I had was about 5 weeks old and had changed in both colour as well as texture.
Baker's or Fresh Yeast that you get in India is basically cake yeast which is available in cuboids starting from 500g. It costs Rs. 30 for 500g, and Rs. 56 for 1 kg. The brand I buy is called "Tower". Now this yeast when fresh has a creamish-yellow colour, and has a crumbly texture. i.e. It should crumble easily when you try to crumble it. If the colour changes to a somewhat darker shade and the texture becomes more paste-like(and hence does not crumble), it means your yeast has been working and is probably "tired". I do NOT know how to check yeast for tiredness because this "tired" yeast when mixed with sugar and water WILL bubble, but when you make bread, won't give a good second rise. And that is exactly what happened with me. I had stored a small amount of yeast in the refrigerator in what I thought was an air-tight container, but it was letting water vapour in so that was what had tired out the yeast. So when you start making bread, make sure your fresh yeast is creamish-yellow in colour and crumbly in texture. Also if it is tried out, it will smell very beerish(will smell of alcohol). Fresh yeast should have a yeasty smell and not a beery smell.
Storage: As far as storage is concerned, this is what I do. I buy about 250g of yeast(enough to make about 20-25 loaves of 400g bread; 300g flour and rest water) and store it in the deep freezer in an air-tight plastic wrap. Every few weeks, I remove about 1/5th the yeast and transfer it into an air-tight plastic box to store in the refrigerator. This is because frozen yeast does not crumble. Also before breaking off the yeast, I leave it in the refrigerator to thaw for at least 6 hours after removing it from the deep freezer.
Baker's or Fresh Yeast that you get in India is basically cake yeast which is available in cuboids starting from 500g. It costs Rs. 30 for 500g, and Rs. 56 for 1 kg. The brand I buy is called "Tower". Now this yeast when fresh has a creamish-yellow colour, and has a crumbly texture. i.e. It should crumble easily when you try to crumble it. If the colour changes to a somewhat darker shade and the texture becomes more paste-like(and hence does not crumble), it means your yeast has been working and is probably "tired". I do NOT know how to check yeast for tiredness because this "tired" yeast when mixed with sugar and water WILL bubble, but when you make bread, won't give a good second rise. And that is exactly what happened with me. I had stored a small amount of yeast in the refrigerator in what I thought was an air-tight container, but it was letting water vapour in so that was what had tired out the yeast. So when you start making bread, make sure your fresh yeast is creamish-yellow in colour and crumbly in texture. Also if it is tried out, it will smell very beerish(will smell of alcohol). Fresh yeast should have a yeasty smell and not a beery smell.
Storage: As far as storage is concerned, this is what I do. I buy about 250g of yeast(enough to make about 20-25 loaves of 400g bread; 300g flour and rest water) and store it in the deep freezer in an air-tight plastic wrap. Every few weeks, I remove about 1/5th the yeast and transfer it into an air-tight plastic box to store in the refrigerator. This is because frozen yeast does not crumble. Also before breaking off the yeast, I leave it in the refrigerator to thaw for at least 6 hours after removing it from the deep freezer.
Sunday, August 24, 2008
How to make chocolate from cocoa powder at home.
I always buy cooking chocolate from shops, and I have noticed that all of them have "hydrogenated vegetable oil" or their equivalents mentioned in the ingredient list. Now, I'm not a big fan of using products that contain fully/partially hydrogenated vegetable oils, so I've long been on the look out for chocolates that do not contain these ingredients. However, on searching, I haven't been able to find any with just a few basic ingredients. The ones that don't contain hydrogenated oils are too expensive because of the high cost of cocoa butter. Also, being in India, where the climate is generally about 33°C - 36°C, manufacturers use Hydrogenated Vegetable Oils to keep the chocolate from melting at room temperature(which is why "foreign" chocolates are generally deformed when we buy them in India).
I have been experimenting, and have found that the following procedure produces good quality bitter chocolate, which I enjoy eating.
Ingredients:
Procedure:
Note: If you want to add more cocoa powder or you find that you are not getting a shiny pourable liquid, you may want to try adding an emulsifier such as "soya lecithin" or "egg yolk" in a proportionate amount, a little at a time, stirring constantly till you get a liquid with a smooth consistency.
I have been experimenting, and have found that the following procedure produces good quality bitter chocolate, which I enjoy eating.
Ingredients:
- 1 unit Melted Unsalted Butter
- 1 unit powdered/pulverised sugar(not Icing sugar), or to taste
- 3 units good quality cocoa powder(I use Cadbury or Hershey's), or to taste
Procedure:
- Melt the Butter, and add all the sugar to it.
- Simmer the butter with the sugar for some time so that sugar is completely melted in the butter and some of the water has vaporised. Keep stirring with a thin wire whisk.
- Remove from the heat.
- Add the cocoa powder a little at a time(preferably in 4~5 batches), stirring all the time with a thin wire whisk, to ensure that no lumps form.
- Add as much cocoa powder as is required(to taste) or to adjust the consistency of the mixture to be like a thick syrup, which can be poured into molds when it is hot/warm.
- You may optionally add vanilla extract for extra flavor. Add only about 1/4tsp for every 100g of butter(or 500g chocolate) or to taste.
- Pour into molds and chill in a refrigerator for about 2 hrs. or till completely solidified.
- Eat directly or use as cooking chocolate or make a hot cup of hot chocolate. Enjoy!
Note: If you want to add more cocoa powder or you find that you are not getting a shiny pourable liquid, you may want to try adding an emulsifier such as "soya lecithin" or "egg yolk" in a proportionate amount, a little at a time, stirring constantly till you get a liquid with a smooth consistency.
Subscribe to:
Posts (Atom)