To the Top
File:  root - text - article - 2019 - 11 - ways-to-traverse-a-grid.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, | English | Home Page | Category: Computing | 291 Views, 14957 Search Bots | 80 Words

Subscribe to Feed Burner | Browse | Archive
Hi, here's your problem today. This problem was recently asked by Microsoft:

You 2 integers n and m representing an n by m grid, determine the number of ways you can get from the top-left to the bottom-right of the matrix y going only right or down.

Example:
n = 2, m = 2

This should return 2, since the only possible routes are:
Right, down
Down, right.

Here's the signature:


def num_ways(n, m):
# Fill this in.

print num_ways(2, 2)
# 2
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, | English | Home Page | Cateogry: Computing | 291 Views, 14957 Search Bots | 80 Words Subscribe to Feed Burner

Related Articles

  1. Algorithm Interview: Smallest Number that is not a Sum of a Subset of List
  2. Daily Interview Problem: Distribute Bonuses
  3. [Daily Problem] Angles of a Clock
  4. Daily Interview Problem: First Missing Positive Integer
  5. 56 Bytes
  6. Daily Interview Problem: Word Ordering in a Different Alphabetical Order
  7. Daily Interview Question: Longest Sequence with Two Unique Numbers
  8. Binary Tree Level with Minimum Sum
  9. Daily Interview Problem: Arithmetic Binary Tree
  10. Consecutive Ones

Comments (0)

Your Email (Domain Part Not Exposed):

Your Comments:

Privately By Mail Colors More Smileys S x y @

Verification (Click Image 2 Refresh):

    Be the first one to comment this page !


Page Edited: October 30 2020 14:21:09 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />