由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 攒人品, Amazon电面
相关主题
如何 serialization 和deserialization hash table ?what problem may occure with singleton at runtime?
Google第二次电面Blackrock onsite
啥叫encode/decode binary tree啊?我老不理解你们刷leetcode 有什么意义
Binary Tree Level Order Traversal为什么老通不过今天下午要面一个老印
问道Binary tree serialization/de-serialization的题问一道算法题
A公司的面经Microsoft and Amazon interview questions
How to serialize hash tableHow to serialize and deserialize
灭三个那么难吗?Serialization/Deserialization of a Binary Tree
相关话题的讨论汇总
话题: virtual话题: table话题: tree话题: serialize话题: hash
进入JobHunting版参与讨论
1 (共1页)
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
3
Bless u.
y***y
发帖数: 224
4
6 How to serialize hash table?
这个怎么答啊?
M********5
发帖数: 715
5
能答7题
第六题不知道是不是考的java里面的serialize问题,楼上的有兴趣可以查查,是网络
编程里面的
i********a
发帖数: 789
6
re
b***u
发帖数: 12010
7
看着感觉有的是java题有的c++?
i*****e
发帖数: 113
8
C++里面也有serialize
boost里面的serialization我不熟悉
不过很早之前的MFC里面有Archieve用来实现持续化存储
这个题说白了就是考怎么遍历数据结构的

【在 M********5 的大作中提到】
: 能答7题
: 第六题不知道是不是考的java里面的serialize问题,楼上的有兴趣可以查查,是网络
: 编程里面的

w********p
发帖数: 948
9
收藏, 谢谢
M********5
发帖数: 715
10

嗯,你说的有道理,这题的考点应该是在遍历,而不是在序列化上面

【在 i*****e 的大作中提到】
: C++里面也有serialize
: boost里面的serialization我不熟悉
: 不过很早之前的MFC里面有Archieve用来实现持续化存储
: 这个题说白了就是考怎么遍历数据结构的

w******a
发帖数: 782
11
zan~
x******h
发帖数: 13678
12
re
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
1 (共1页)
进入JobHunting版参与讨论
相关主题
Serialization/Deserialization of a Binary Tree问道Binary tree serialization/de-serialization的题
面经A公司的面经
怎样serialize binary tree 比较好?How to serialize hash table
Deserialize in-order array to a minimum height binary tree.灭三个那么难吗?
如何 serialization 和deserialization hash table ?what problem may occure with singleton at runtime?
Google第二次电面Blackrock onsite
啥叫encode/decode binary tree啊?我老不理解你们刷leetcode 有什么意义
Binary Tree Level Order Traversal为什么老通不过今天下午要面一个老印
相关话题的讨论汇总
话题: virtual话题: table话题: tree话题: serialize话题: hash