pratik-choudhari / AlgoCode

Welcome everyone!🌟 Here you can solve problems, build scrappers and much more💻
https://github.com/pratik-choudhari/AlgoCode
MIT License
131 stars 166 forks source link

Permutations for N People to Occupy R Seats In A Classroom #330

Closed pallavivaswani closed 3 years ago

pallavivaswani commented 3 years ago

Feature ✅

Description

Write a code to find all the possible permutations in which N people can occupy R number of seats in a classroom N students are looking to find R seats in a classroom. Some of the seats are already occupied and only a few can be accommodated in the classroom. The available seats are assumed as R and N number of people are looking to accommodate within the room.

Hint :

nPr = n! / (n-r)!

Example

Input:

Enter the num of people: 9 Enter the number of seats available: 5

Output:

Num of ways people can be seated: 15120

Checklist:

Contributors are supposed to mention their coding language while asking for assignment

ciandunne commented 3 years ago

I would like to do this in C please.

therupdeep commented 3 years ago

@pallavivaswani @pratik-choudhari i would like to do this in Java. Can you assign it to me?

pratik-choudhari commented 3 years ago

@therupdeep You are assigned to two issues which is max limit for this repository.

raj2729 commented 3 years ago

Hello @pratik-choudhari I would like to do this in Java. Could you assign it to me?

maityankan10 commented 3 years ago

I would like to do this in c++

subhadeep1912 commented 3 years ago

@pratik-choudhari I can do this in C#

pratik-choudhari commented 3 years ago

@maityankan10 C/C++ is already assigned to @cianopiano

ghost commented 3 years ago

@pratik-choudhari please Assign this to me. I will do in python.