shreyansh-sawarn / Hacktoberfest

Participate in Hacktoberfest. Learn and get started. Contribute to open source. Make sure your pull requests are legitimate. Enjoy and have fun.
22 stars 80 forks source link

Create Array_Permutation_1_to_N.cpp #199

Closed AriesShilz closed 3 years ago

AriesShilz commented 3 years ago

A sequence of N integers is called a permutation if it contains all integers from 1 to N exactly once. This code is to find if the array taken from the user is a permutation of numbers from 1 to N, in C++. The idea used here is that : if the size of the set if equal to N then the array represents a permutation else it doesn’t.

shreyansh-sawarn commented 3 years ago

Head to this repository to contribute to Hacktoberfest. Sorry for the inconveniences faced.