迅雷廣州C++二筆題09.10.13ZZ 軟件測試
迅雷廣州C++二筆題09.10.13ZZ
記下了題目大概,希望大家看得懂
第一題:
n個文件長度記載在無符號64位整數數組file_length[]中,邏輯首尾拼接在一起形成一個邏輯上的大文件。
struct range
{
__int64 pos;
__int64 length;
};
記載數據片段的起始點和長度,range_array[]記載若干個片斷,求n個文件每個文件共有多長的數據在range_array[]的數據片斷中
struct range
{
__int64 pos;
__int64 length;
};
void get_length(__int64 file_length[],unsigned n,range range_array[],unsigned m,__int64 result[])
第二題:
求循環節,若整除則返回NULL,否側返回char*指向循環節。先寫思路。
函數原型:char* get_circle_digits(unsigned k,unsigned j)
原文轉自:http://www.anti-gravitydesign.com