trupt

You are climbing a stair case. It takes n steps to reach to the top.

Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

Note: Given n will be a positive integer.

Muhittin Birtekocak kullanıcısından Input: 2 Output:   2 Explanation:   There ...Muhittin Birtekocak11:43

Input: 2

Output:  2

Explanation:  There are two ways to climb to the top.

 

1. 1 step + 1 step

2. 2 steps

Muhittin Birtekocak kullanıcısından Input: 3 Output:   3 Explanation:   There ...Muhittin Birtekocak11:45

Input: 3

Output:  3

Explanation:  There are three ways to climb to the top.

 

1. 1 step + 1 step + 1 step

2. 1 step + 2 steps

3. 2 steps + 1 step

Muhittin Birtekocak kullanıcısından   Given a 2d grid map of  '1' s (land) and ...Muhittin Birtekocak11:50

 

Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.

Muhittin Birtekocak kullanıcısından Example 1: 11110 11010 11000 00000Muhittin Birtekocak11:53

Example 1:

 

Plain Text11110
11010
11000
00000bağlam menüsü var

 

bağlam menüsü var