目前本站已有 十几万 份求职资料啦!


应聘IT公司笔试算法题目

10-16 00:00:09 来源:http://www.qz26.com 笔试题目   阅读:8442
导读: {'X','o','X','X','X','X','X','X'},{'X','o','X','X','o','o','o','X'}, {'X','o','o','o','o','X','o','o'}, {'X','X','X','X','X','X','X','X'}};
应聘IT公司笔试算法题目,标签:银行笔试题目,企业笔试题目,http://www.qz26.com
                         {'X','o','X','X','X','X','X','X'},
{'X','o','X','X','o','o','o','X'},
         {'X','o','o','o','o','X','o','o'},
                                 {'X','X','X','X','X','X','X','X'}};
void FindPath(int X, int Y) {
    if(X == MAX_SIZE || Y == MAX_SIZE) {
       for(int i = 0; i < MAX_SIZE; i++)
for(int j = 0; j < MAX_SIZE; j++)
                  printf("%c%c", Maze[j], j < MAX_SIZE-1 ? ' ' : '\n');
}else for(int k = 0; k < 4; k++)
if(X >= 0 && Y >= 0 && Y < MAX_SIZE && X < MAX_SIZE && 'o' == Maze[X][Y]) {
                   Maze[X][Y] = ' ';
                   FindPath(X+V[k], Y+H[k]);
                   Maze[X][Y] ='o';
}
}
int main(int argc, char* argv[]) {
    FindPath(1,0);
}

7、随机分配座位,共50个学生,使学号相邻的同学座位不能相邻(早些时候用C#写的,没有用C改写)。
static void Main(string[] args)
{
 int Tmp = 0, Count = 50;  
 int[] Seats = new int[Count];  
 bool[] Students = new bool[Count];
 System.Random RandStudent=new System.Random();
 Students[Seats[0]=RandStudent.Next(0,Count)]=true;
 for(int i = 1; i < Count; ) {
     Tmp=(int)RandStudent.Next(0,Count);
     if((!Students[Tmp])&&(Seats[i-1]-Tmp!=1) && (Seats[i-1] - Tmp) != -1) {
   Seats[i++] = Tmp;
Students[Tmp] = true;
  }
 }
 foreach(int Student in Seats)
     System.Console.Write(Student + " ");
 System.Console.Read();
}

8、求网格中的黑点分布。现有6*7的网格,在某些格子中有黑点,已知各行与各列中有黑点的点数之和,请在这张网格中画出黑点的位置。(这是一网友提出的题目,说是他笔试时遇到算法题)
#define ROWS 6
#define COLS 7
int iPointsR[ROWS] = {2, 0, 4, 3, 4, 0};           // 各行黑点数和的情况
int iPointsC[COLS] = {4, 1, 2, 2, 1, 2, 1};        // 各列黑点数和的情况
int iCount, iFound;
int iSumR[ROWS], iSumC[COLS], Grid[ROWS][COLS];

int Set(int iRowNo) {
if(iRowNo == ROWS) {
        for(int iColNo=0; iColNo < COLS && iSumC[iColNo]==iPointsC[iColNo]; iColNo++)
           if(iColNo == COLS-1) {
               printf("\nNo.%d:\n", ++iCount);
               for(int i=0; i < ROWS; i++)
                  for(int j=0; j < COLS; j++)

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  下一页


Tag:笔试题目银行笔试题目,企业笔试题目求职笔试面试 - 笔试题目
【字号: 】 【打印】 【关闭
下一条:计算笔试题目
《应聘IT公司笔试算法题目》相关文章
最新更新
推荐热门
联系我们 | 网站地图 | 财务资料 | 范文大全 | 求职简历 | 财会考试 | 成功励志
Copyright 二六求职资料网 All Right Reserved.
1 2 3 4 5 6 7 8 9 10