{"id":"c319c7a3-b616-4e50-b6d1-4968abb2d4f8","name":"Number Of Ways Of Triangulation","description":"1. You are given a number N, which represents the number of sides in a polygon.\r\n2. You have to find the total number of ways in which the given polygon can be triangulated.","inputFormat":"A number N","outputFormat":"A number representing number of ways of traingulating a N-sided polygon.","constraints":"1 <= N <= 15","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n\r\n\tpublic static int solution(int n){\r\n\t\t// write your code here\r\n\t\t\r\n\t\treturn 0;\r\n\t }\r\n\t \r\n\tpublic static void main(String[] args) {\r\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint n = scn.nextInt();\r\n\t\tSystem.out.println(solution(n));\r\n\t}\r\n\r\n}"},"node":{"code":""},"ruby":{"code":""},"python":{"code":""}},"points":10,"difficulty":"easy","sampleInput":"5","sampleOutput":"5\r\n","questionVideo":"https://www.youtube.com/embed/jSGW3YKkyHQ?end=102","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"5539a6e8-c8bf-4f04-805c-e43e9d20e72a","name":"Dynamic Programming For Intermediate","slug":"dynamic-programming-for-intermediate-408","type":0},{"id":"7423719c-5618-49aa-8af0-b38f1542df06","name":"Number Of Ways Of Triangulation","slug":"number-of-ways-of-triangulation","type":1}],"next":{"id":"4f005fff-fe5d-4e3c-8bce-083878cd8376","name":"NUMBER OF WAYS OF TRIANGULATION MCQ","type":0,"slug":"number-of-ways-of-triangulation-mcq"},"prev":{"id":"363133ae-f5f7-45b8-abfa-38ccc01623bc","name":"Minimum Score Of Triangulation","type":3,"slug":"minimum-score-of-triangulation"}}}

Number Of Ways Of Triangulation

1. You are given a number N, which represents the number of sides in a polygon. 2. You have to find the total number of ways in which the given polygon can be triangulated.

{"id":"c319c7a3-b616-4e50-b6d1-4968abb2d4f8","name":"Number Of Ways Of Triangulation","description":"1. You are given a number N, which represents the number of sides in a polygon.\r\n2. You have to find the total number of ways in which the given polygon can be triangulated.","inputFormat":"A number N","outputFormat":"A number representing number of ways of traingulating a N-sided polygon.","constraints":"1 <= N <= 15","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n\r\n\tpublic static int solution(int n){\r\n\t\t// write your code here\r\n\t\t\r\n\t\treturn 0;\r\n\t }\r\n\t \r\n\tpublic static void main(String[] args) {\r\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint n = scn.nextInt();\r\n\t\tSystem.out.println(solution(n));\r\n\t}\r\n\r\n}"},"node":{"code":""},"ruby":{"code":""},"python":{"code":""}},"points":10,"difficulty":"easy","sampleInput":"5","sampleOutput":"5\r\n","questionVideo":"https://www.youtube.com/embed/jSGW3YKkyHQ?end=102","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"5539a6e8-c8bf-4f04-805c-e43e9d20e72a","name":"Dynamic Programming For Intermediate","slug":"dynamic-programming-for-intermediate-408","type":0},{"id":"7423719c-5618-49aa-8af0-b38f1542df06","name":"Number Of Ways Of Triangulation","slug":"number-of-ways-of-triangulation","type":1}],"next":{"id":"4f005fff-fe5d-4e3c-8bce-083878cd8376","name":"NUMBER OF WAYS OF TRIANGULATION MCQ","type":0,"slug":"number-of-ways-of-triangulation-mcq"},"prev":{"id":"363133ae-f5f7-45b8-abfa-38ccc01623bc","name":"Minimum Score Of Triangulation","type":3,"slug":"minimum-score-of-triangulation"}}}
plane

Editor


Loading...

Number Of Ways Of Triangulation

easy

1. You are given a number N, which represents the number of sides in a polygon. 2. You have to find the total number of ways in which the given polygon can be triangulated.

Constraints

1 <= N <= 15

Format

Input

A number N

Output

A number representing number of ways of traingulating a N-sided polygon.

Example

Sample Input

5

Sample Output

5

Question Video

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode