Amazon online test - 考試
By Hamiltion
at 2013-03-24T13:57
at 2013-03-24T13:57
Table of Contents
小弟不才剛剛也去考試了, 回報一下試題:
1. 給一個int array, 再給一個S, 請利用array 內的東西組成S, 如果組不出來
回傳-1
EX1: {1,3,5}, S= 11
A: 3; --> 3 = 5+5+1
EX2: {5, 5, 5, 5, 5, 5}, S=11
A: -1;
int mincoins(int a[], int N, int S)
{
// N is length of a[]
}
2. 取 int 的 1's 補數
EX1: 50 -> 110010
A: 13 -> 001101
EX2: 100 -> 1100100
27 -> 0011011
int complement (int n)
{
}
------------------------------ 結束 -----------------------
麻煩大家提供答案囉!
--
1. 給一個int array, 再給一個S, 請利用array 內的東西組成S, 如果組不出來
回傳-1
EX1: {1,3,5}, S= 11
A: 3; --> 3 = 5+5+1
EX2: {5, 5, 5, 5, 5, 5}, S=11
A: -1;
int mincoins(int a[], int N, int S)
{
// N is length of a[]
}
2. 取 int 的 1's 補數
EX1: 50 -> 110010
A: 13 -> 001101
EX2: 100 -> 1100100
27 -> 0011011
int complement (int n)
{
}
------------------------------ 結束 -----------------------
麻煩大家提供答案囉!
--
Tags:
考試
All Comments
By Brianna
at 2013-03-24T21:22
at 2013-03-24T21:22
By Rosalind
at 2013-03-29T04:12
at 2013-03-29T04:12
By Kama
at 2013-03-30T03:40
at 2013-03-30T03:40
By Zora
at 2013-04-02T08:52
at 2013-04-02T08:52
By Wallis
at 2013-04-05T15:55
at 2013-04-05T15:55
By Faithe
at 2013-04-08T05:54
at 2013-04-08T05:54
By Noah
at 2013-04-09T11:34
at 2013-04-09T11:34
Related Posts
漢翔剛打給我面試
By Andrew
at 2013-03-23T14:53
at 2013-03-23T14:53
裁員 待業 面試 成長
By Tom
at 2013-03-23T00:14
at 2013-03-23T00:14
電波組的出路...
By Olga
at 2013-03-23T00:00
at 2013-03-23T00:00
見山不是山,見山又是山-我的社工路
By Wallis
at 2013-03-21T00:48
at 2013-03-21T00:48
一位三星員工的第一手告白-宗教般洗腦
By Caroline
at 2013-03-20T23:41
at 2013-03-20T23:41