1. Tranlation (Mandatory) 2. Programming (Mandatory) Linked list a. Implement a linked list for integers,which supports the insertafter (insert a node after a specified node) and removeafter (remove the node after a specified node) methods; b. Implement a method to sort the linked list to descending order. 3. Debugging (Mandatory) static int f(int i){ return f(i-1)*f(i-1); } Ansewr: static int f(int i){ else {return f(i-1)*f(i-1);} } Ansewr: static int f(int i){ else {return f(i-1)*f(i-2);} } Ansewr: b. There are two errors in the following JAVA program: static void g(int i){ else {g(3*i);return;} } please correct them to make sure we can get the printed-out result as below: 3 10 5 16 8 4 2 1
|
|
| 上一篇:要当CEO助理 先过“辣椒关” | 下一篇:名企代表性考题集粹(一) |
| 网站地图 ┊ 关于我们 ┊ 收藏本站 ┊ 设置首页 Copyright @ www.gerenjianli.com Powered by 个人简历网 All Rights Reserved. |