Contest
Coder Grove

## Factorials of large numbers – Contest Question – 02

Given an integer N, find its factorial. Note: Solution language is your choice (Java, Python, Dotnet, etc…) Example 1: Input: N = 5 Output: 120 Explanation: 5! = 1*2*3*4*5 = 120 Example 2: Input: N = 10 Output: 3628800 Explanation: 10! = 1*2*3*4*5*6*7*8*9*10 = 3628800 Your Task: You don’t need to ...Read more

Given an integer N, find its factorial.

Note: Solution language is your choice (Java, Python, Dotnet, etc…)

Example 1:

Input: N = 5

Output: 120

Explanation: 5! = 1*2*3*4*5 = 120

Example 2:

Input: N = 10

Output: 3628800

Explanation:

10! = 1*2*3*4*5*6*7*8*9*10 = 3628800

You don’t need to read input or print anything. Complete the function factorial () that takes integer N as input parameter and returns a list of integers denoting the digits that make up the factorial of N.

Constraints:

1 ≤ N ≤ 1000

Contest
Coder Grove

## Move all negative elements to end – Contest Question – 01

Given an unsorted array arr [] of size N having both negative and positive integers. The task is placing all negative element at the end of array without changing the order of positive element and negative element.  Note: Solution language is your choice ...Read more

Given an unsorted array arr [] of size N having both negative and positive integers. The task is placing all negative element at the end of array without changing the order of positive element and negative element.

Note: Solution language is your choice (Java, Python, Dotnet, etc…)

Example 1:

Input:

N = 8

Arr [] = {1, -1, 3, 2, -7, -5, 11, 6}

Output:

1  3  2  11  6 -1  -7  -5

Example 2:

Input:

N=8

Arr [] = {-5, 7, -3, -4, 9, 10, -1, 11}

Output:

7  9  10  11  -5  -3  -4  -1