Given two positions A and B in a 3D coordinate system. Find out how many ways to go from A to B to reach the shortest path possible, and we can only move in horizontal or vertical directions.
Sample Input:
A = (10, 5, 0), B = (6, 10, 10)
Sample Output:
11639628
数据结构和算法:初级练习题 #63 排列和组合 (一)
给定3D坐标里的两个点A和B的位置,如果只能走水平或垂直方向,计算从A到B的最短路径有多少种走法,。
输入样例:
A = (10, 5, 0), B = (6, 10, 10)
输出样例:
11639628