You are on page 1of 3

Guide:

● Do this using the php / java / vb.net / C# / ASP.Net / C++ / Pseudocode /


javascript language (​choose one​).
● Submit as one .zip which containing 1 project / 1 solution that can be run as an
application.
● Specifically for React Native project, please do not include the node_modules,
android and ios folders in the .zip file.

1. Problem : Biggest Factor (60 Poin) (NDL005)


Given N integers, select a subset of N numbers so that we can form all numbers from 1 to (X)
Factor, use one or several numbers (one time each) from the subset. For example, using 3
numbers: 1, 2 and 3, we can form all the numbers from 1 to 6 using these 3 numbers (1, 2, 3 = 1
+ 2, 4 = 1 + 3, 5 = 2 + 3, 6 = 1 + 2 + 3). So, if you have 2 numbers: 1 and 3, even though you
can form 4 = 1 + 3, you cannot form 2, so in this case (X) Factor = 1. Your task is to find the
biggest (X) Factor that can be formed.

Input :
The first line contains N integers t1..N (1 ≤ ti ≤ 100000) which states the available numbers.

Output :
Print a single line output that contains the biggest (X) Factor value that can be formed.

Test Cases :
Input Output

1 2 3 10 6

1 1 100 2

Copyright © PT Nawa Data Solutions ​1


2. Problem : Sort Character (50 Poin) (NDL002)
Input :
One line of words (S).

Output :
Contains vowel and consonant characters that has been sorted according to the following rules.
- Sort the letters in alphabetical order in the group.
- Separate between vowels and consonants.
- Process as lowercase letters (whitespaces are ignored)

Test Cases :
Input Output

Sample Case Vowel Characters :


aaee
Consonant Characters :
clmpss

Next Case Vowel Characters :


aee
Consonant Characters :
cnstx

Copyright © PT Nawa Data Solutions ​2

You might also like