Tuesday, April 5, 2022

Leetcode Problem: Climbing Stairs

Problem of Today: Climbing Stairs

Problem description: https://leetcode.com/problems/climbing-stairs/

Solution Approach: Memoization

Solution: 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
class Solution {
    private int memo[];
    
    // Bottom-up
    public int climbStairs(int n) {
        memo = new int[n+1];
        for (int i=0; i<=n; i++) {
            memo[n] = -1;
        }
        memo[0] = 1;
        memo[1] = 1;
        for (int i=2; i<=n; i++) {
            memo[i] = memo[i-1] + memo[i-2];
        }
        
        return memo[n];
    }
}


Happy Coding!


Love! ❤️ 
#Lets #Code

Follow us on :

https://twitter.com/ThinkAlgorithms


Sunday, April 10, 2011

Mulberry fruit tart

Yesterday, I made this cool dessert to fulfill my sweet craving!
Have a look at the lightly baked flan and fruits spread in a pretty pattern with granulated sugar sprinkled on top, just before the final bake-

And this one's right after finally coming out of the microwave. As you can see the fruits loosened and the filling became syrupy.

It was the first time I made ever made a tart so there were little mistakes to be kept in mind the next time like the base of the pastry was not crisp enough so that means one has to cook the pastry (without fruits) a little longer until a visible color change.


It was yum after refrigeration (and even Saloni, my biggest critique was returning to the fridge every now and then for it so you can guess, hehh ;) with the syrup thickened even more and combining flavors of  sour kiwi, oranges, strawberries and pineapple and sweetness of mulberries! I might even consider keeping the container shallower so that there is more crust with each bite :D (this was the broadest base I could manage this time around)! Even the syrup tasted great and the combination of fruits can be used to make delicious jelly/jam too!

Friday, February 4, 2011

Papa's 50th birthday!

The golden jubilee definitely deserves a party and is due for Sunday :) But I couldn't resist baking a cake and  waking dad up in the middle of the night to cut it! :D

'twas a marble cake with chocolate sauce topping and dad loved it -





puffy says it's lip-smacking ( :) )

yeah! still sleepyyy...


yummiliciousss....!!! drooling?

Monday, January 24, 2011

Office time!!

One may argue on my office being an office!
Definitely, not a very conventional one I possess either!


With sun streaming in through the window and working room just a few steps away from my bed-room this work style is definitely a convenience. Having such an experience was something I could have never thought of even in my dreams, but the work we do was surely my craving. Empathy, the project I work on is used by millions who love Gnome and I get part of their Empathy-love for making their product better. With super-talented people around me I get to learn something new each day!

Working on feature/bug of will, IRC presences, emails, bug-fixing, patch reviews, code merged into master within seconds, cut-throat competition and remarkable salary - yeah my work has all this & I am extremely in love with it! ♥ ♥

Friday, December 10, 2010

Internship start-date approaching~

Nervous? Nahh!! VERY nervous and equally exited too!!! :D

Let's hope I keep up to mark and create things that the world would remarkably recognize and appreciate! I have a long way to go and this is only the first step. I have learnt a lot of things on my way to this first rung of my career and it was a wonderful experience :)
Wondering how enthralling it's gonna be beyond this.

Well, I supposedly shouldn't be raving much on this.... am simply feeling it! yeah!! :D <3

Friday, November 12, 2010

Pineapple Jelly!

Just to caress my eyes yesterday, I made something having very low nutritional advantage and high amount of calories but really pretty. Go on, balm your eyes too...





Yummie, mouth-watering jelly!