b********e 发帖数: 693 | 1 基本概念较多,希望能给个机会呵呵
1. Singleton class
2 Virtual Function
3 Virtual Function overhead( both space and speed(
Space virtual table
Speed, dynamically binding, take time to find right function
4 virtual table
5 Hash Table, how to handle collision.
6 How to serialize hash table, how to serialize Binary Tree
7 big array, can not put memory, how to sort
external sort, and then merge
9 smart pointer
10 map vs hash_map
11 volatile
12 code: print binary tree level by level
这题我用queue实现的,然后每层打印 | z*z 发帖数: 837 | 2 bless
【在 b********e 的大作中提到】 : 基本概念较多,希望能给个机会呵呵 : 1. Singleton class : 2 Virtual Function : 3 Virtual Function overhead( both space and speed( : Space virtual table : Speed, dynamically binding, take time to find right function : 4 virtual table : 5 Hash Table, how to handle collision. : 6 How to serialize hash table, how to serialize Binary Tree : 7 big array, can not put memory, how to sort
| g*****1 发帖数: 173 | | y***y 发帖数: 224 | 4 6 How to serialize hash table?
这个怎么答啊? | M********5 发帖数: 715 | 5 能答7题
第六题不知道是不是考的java里面的serialize问题,楼上的有兴趣可以查查,是网络
编程里面的 | i********a 发帖数: 789 | | b***u 发帖数: 12010 | | i*****e 发帖数: 113 | 8 C++里面也有serialize
boost里面的serialization我不熟悉
不过很早之前的MFC里面有Archieve用来实现持续化存储
这个题说白了就是考怎么遍历数据结构的
【在 M********5 的大作中提到】 : 能答7题 : 第六题不知道是不是考的java里面的serialize问题,楼上的有兴趣可以查查,是网络 : 编程里面的
| w********p 发帖数: 948 | | M********5 发帖数: 715 | 10
嗯,你说的有道理,这题的考点应该是在遍历,而不是在序列化上面
【在 i*****e 的大作中提到】 : C++里面也有serialize : boost里面的serialization我不熟悉 : 不过很早之前的MFC里面有Archieve用来实现持续化存储 : 这个题说白了就是考怎么遍历数据结构的
| w******a 发帖数: 782 | | x******h 发帖数: 13678 | | P*******b 发帖数: 1001 | 13 这些好像是C++ 问题?amazon有C++职位吗?
【在 b********e 的大作中提到】 : 基本概念较多,希望能给个机会呵呵 : 1. Singleton class : 2 Virtual Function : 3 Virtual Function overhead( both space and speed( : Space virtual table : Speed, dynamically binding, take time to find right function : 4 virtual table : 5 Hash Table, how to handle collision. : 6 How to serialize hash table, how to serialize Binary Tree : 7 big array, can not put memory, how to sort
| i**********e 发帖数: 1145 | 14 For question no. 6 (Binary tree serialization),
Writing the tree to a file is called 'serialization' and reading back from
the file to reconstruct the exact same binary tree is 'deserialization'.
You can use pre-order to traverse the tree one time to do the serialization.
The other method would be using a level-order traversal.
http://www.ihas1337code.com/2010/09/serializationdeserialization-of-binary.html
Question no. 12 you can either use 2 queues, currentLevel and nextLevel. Pop
nodes off currentLevel one at a time, and pushes two of its child nodes to
nextLevel. When currentLevel is empty, you will print the endline. Then swap
the two queues and continue again.
The other method is use counter to keep track of the number of nodes in
currentLevel and nextLevel.
http://www.ihas1337code.com/2010/09/printing-binary-tree-in-level-order.html
一些常见面试题的答案与总结 -
http://www.ihas1337code.com |
|