Home > Back-end >  fit1045
fit1045

Time:11-09



Question:

Divided into three Task, Task1: this is a sorting Task, each sequence set first as a pivot, the original collection into less than, equal to, greater than the pivot, the distribution of demand is only in the original set to change above, and only O (n) complexity, Task2: Task is to make a number of games, divided into five steps, 1. The reading game grid files, output, (2) according to the rules of sudoku check insert position is valid, (3) in the first r line input, if have the number in the r line, it returns the original mesh grid game, or return to insert the value of the grid (there may be multiple locations can insert the Numbers), 4) to input Numbers in the grid, output all the result of the match, 5. Input text saved games, output the correct results of sudoku, Task3:1. On a street adjacent residents will not buy goods at the same time, find the largest turnover in this street, (2), according to the set of hamburgers, judge one input is true hamburgers,

Analytic:

Task one can set up a few Pointers said three species should be inserted into the position, so traverse an array can make them in the correct position, task 2 need to deal with a multidimensional array, judge the same line in the same column figures are the same, as well as problems, read a file will be stored in a text of sudoku load the output right after sudoku results, three the first question can adopt dynamic programming tasks, the second is a character that matches the question, the task can consider is three kind of parentheses matching problem (left parenthesis can match the corresponding brackets right parenthesis),

Involving knowledge: array, character processing
  • Related