AllieLee

导航

2013 微软校园实习生笔试题及详解(16-20题)

 

16. we can recover the binary tree if given the output of(5 Points)

    A. Preorder traversal and inorder traversal

    B. Preorder traversal and postorder traversal

    C. Inorder traversal and postorder traversal

    D. Postorder traversal

 

 

 

 

 

 

问题解析:

 

17. Given a string with n characters, suppose all the characters are different from each other, how many different substrings do we have?(5 Points)

    A. n+1

    B. n^2

    C. n(n+1)/2

    D. 2^n-1

    E. n!

 

 

 

 

 

 

 

问题解析:

 

18. Given the following database table, how many rows will the following SQL statement update?(5 Points)

 

BookId              

Title

Category

NumberofCopies

AuthorId

1

SQL Server 2008

MS

3

1

2

SharePoint 2007

MS

2

2

3

SharePoint 2010

MS

4

2

5

DB2

IBM

10

3

7

SQL Server 2012

MS

6

1

 

 

 

 

 

 

 

 

                

    A. 1

    B. 2

    C. 3

    D. 4

    E. 5

 

 

 

 

 

 

 

问题解析:

 

19. What is the shortest path between node S and node T, given the graph below? Note: the numbers represent the lengths of the connected nodes.(13 Points)

 

 

  A. 17

    B. 18

    C. 19

    D. 20

    E. 21

 

 

 

 

 

 

问题解析:

 

20. Given a set of N balls and one of which is defective (weighs less than others), you are allowed to weigh with a balance 3 times to find the defective. Which of the following are possible N?(13 Points)

    A. 12

    B. 16

    C. 20

    D. 24

    E. 28

 

 

 

 

 

 

 

问题解析:

 

posted on 2013-04-07 21:10  AllieLee  阅读(245)  评论(0编辑  收藏  举报