larissalages / code_problems

Code Problems from Coding Challenge Websites. The goal is to help them to improve their code skills and also studying for coding interviews.
MIT License
55 stars 181 forks source link

Summation Triangle sucessful submission in C #470

Open vcnovaes opened 2 years ago

vcnovaes commented 2 years ago

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

Description

This is a solution for the problem summation triangle of the Code Wars site: Summation Triangle - Code Wars

image Above you have the problem description!

In this code we have two solutions but only the pg_approach(unsigneed n) is accepted by CodeWars, the brute_force(int n) approach fails in terms of complexity, so it's not accepted by CodeWars, but it gives the right results :heart: Thank you!