From 2166cb56532df5ce17e8af72b278c92101300966 Mon Sep 17 00:00:00 2001 From: Ananya Singh Date: Sun, 10 Oct 2021 22:32:02 +0530 Subject: [PATCH] 62. Unique Paths --- Leetcode/CPP/Unique Paths.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Leetcode/CPP/Unique Paths.cpp diff --git a/Leetcode/CPP/Unique Paths.cpp b/Leetcode/CPP/Unique Paths.cpp new file mode 100644 index 00000000..08d4b563 --- /dev/null +++ b/Leetcode/CPP/Unique Paths.cpp @@ -0,0 +1,22 @@ +//Submitteb by: Ananya Singh (https://github.com/AnanyaSingh2121) +//Problrm statement: https://leetcode.com/problems/unique-paths/ +//Solution Code: + +class Solution { +public: + //using DP. creating a m*n matrix + int uniquePaths(int m, int n) { + int dp[m][n]; + for(int i=0; i