# Puzzle 33) Sitting Arrangement

Submitted by Ashish Varshney, on February 22, 2018

**Puzzle**

Aeris and his 3 friends become so talkative that their teacher decides to make boys sit with five girls. Now the teacher is confused how to make it possible. Your task is to help the teacher to make such arrangement.

**Key Points:**

- Every boy must set between two girls.
- No boys set together.

**Answer**

**2880**

**Explanation/Solution**

Total number of ways in which teacher makes sitting arrangement can be calculated using the formula of permutation and combination.

**Total no. of ways = 4! X 5! = 24*120 = 2880**

TOP Interview Coding Problems/Challenges

- Run-length encoding (find/print frequency of letters in a string)
- Sort an array of 0's, 1's and 2's in linear time complexity
- Checking Anagrams (check whether two string is anagrams or not)
- Relative sorting algorithm
- Finding subarray with given sum
- Find the level in a binary tree with given sum K
- Check whether a Binary Tree is BST (Binary Search Tree) or not
- 1[0]1 Pattern Count
- Capitalize first and last letter of each word in a line
- Print vertical sum of a binary tree
- Print Boundary Sum of a Binary Tree
- Reverse a single linked list
- Greedy Strategy to solve major algorithm problems
- Job sequencing problem
- Root to leaf Path Sum
- Exit Point in a Matrix
- Find length of loop in a linked list
- Toppers of Class
- Print All Nodes that don't have Sibling
- Transform to Sum Tree
- Shortest Source to Destination Path

Comments and Discussions

**Ad:**
Are you a blogger? Join our Blogging forum.