n***n 发帖数: 1037 | 1 希望能有大家的加油.也希望大家good luck.
Q1: write a function to implement the function memcopy
This one is not testing for the overlap. The interviewer asked how to optimize this loop. And you need to take into account the alignment issue.
Q2: Given two list of strings, find the commmon one.
list1:
apple
orange
list2:
apple
mongo
result:
apple
Update:
Many thanks for everyone's suport. I have passed the phone screen. Now I am moving to the next step. |
j**7 发帖数: 59 | |
g*******y 发帖数: 1930 | 3 bless!
我最近知道不少人电面拿到onsite的~希望lz成为下一个~ |
i****h 发帖数: 321 | |
l********n 发帖数: 86 | |
E*******0 发帖数: 465 | |
h***z 发帖数: 91 | 7 加油!
【在 n***n 的大作中提到】 : 希望能有大家的加油.也希望大家good luck. : Q1: write a function to implement the function memcopy : This one is not testing for the overlap. The interviewer asked how to optimize this loop. And you need to take into account the alignment issue. : Q2: Given two list of strings, find the commmon one. : list1: : apple : orange : list2: : apple : mongo
|
x**y 发帖数: 70 | 8 good luck!
有空写写面经哦.
【在 n***n 的大作中提到】 : 希望能有大家的加油.也希望大家good luck. : Q1: write a function to implement the function memcopy : This one is not testing for the overlap. The interviewer asked how to optimize this loop. And you need to take into account the alignment issue. : Q2: Given two list of strings, find the commmon one. : list1: : apple : orange : list2: : apple : mongo
|
r**m 发帖数: 163 | 9 bless!
我一会儿就面了,好紧张,bless myself! |
k***e 发帖数: 556 | 10 不是太难 patpat
【在 n***n 的大作中提到】 : 希望能有大家的加油.也希望大家good luck. : Q1: write a function to implement the function memcopy : This one is not testing for the overlap. The interviewer asked how to optimize this loop. And you need to take into account the alignment issue. : Q2: Given two list of strings, find the commmon one. : list1: : apple : orange : list2: : apple : mongo
|
|
|
r**u 发帖数: 1567 | 11 bless
【在 n***n 的大作中提到】 : 希望能有大家的加油.也希望大家good luck. : Q1: write a function to implement the function memcopy : This one is not testing for the overlap. The interviewer asked how to optimize this loop. And you need to take into account the alignment issue. : Q2: Given two list of strings, find the commmon one. : list1: : apple : orange : list2: : apple : mongo
|
s*******r 发帖数: 197 | |
s********9 发帖数: 651 | |
n*****t 发帖数: 58 | 14 祝你成功!
【在 n***n 的大作中提到】 : 希望能有大家的加油.也希望大家good luck. : Q1: write a function to implement the function memcopy : This one is not testing for the overlap. The interviewer asked how to optimize this loop. And you need to take into account the alignment issue. : Q2: Given two list of strings, find the commmon one. : list1: : apple : orange : list2: : apple : mongo
|
C**********n 发帖数: 100 | 15 第二题怎么做最好啊?
hash?
【在 n***n 的大作中提到】 : 希望能有大家的加油.也希望大家good luck. : Q1: write a function to implement the function memcopy : This one is not testing for the overlap. The interviewer asked how to optimize this loop. And you need to take into account the alignment issue. : Q2: Given two list of strings, find the commmon one. : list1: : apple : orange : list2: : apple : mongo
|
k***e 发帖数: 556 | 16 第一题在programming版看到有人说如果他面人时必问
难道就是那外?
【在 n***n 的大作中提到】 : 希望能有大家的加油.也希望大家good luck. : Q1: write a function to implement the function memcopy : This one is not testing for the overlap. The interviewer asked how to optimize this loop. And you need to take into account the alignment issue. : Q2: Given two list of strings, find the commmon one. : list1: : apple : orange : list2: : apple : mongo
|
c*********n 发帖数: 1057 | 17 除了handle不同的overlap外,还需要注意什么呢?
【在 k***e 的大作中提到】 : 第一题在programming版看到有人说如果他面人时必问 : 难道就是那外?
|
k***e 发帖数: 556 | 18 就是overlap 没其巧了吧
【在 c*********n 的大作中提到】 : 除了handle不同的overlap外,还需要注意什么呢?
|
C**********n 发帖数: 100 | 19 什么overlap,能说详细点吗?
【在 k***e 的大作中提到】 : 就是overlap 没其巧了吧
|
c*********n 发帖数: 1057 | 20 就是source 和 destination 有重合的部分
【在 C**********n 的大作中提到】 : 什么overlap,能说详细点吗?
|
|
|
C**********n 发帖数: 100 | 21 谢谢,
请问那怎么避免重合呢?
加const可以吗?
【在 c*********n 的大作中提到】 : 就是source 和 destination 有重合的部分
|
c*********n 发帖数: 1057 | 22 不是避免是,检测重合,然后对重合的情况特殊处理
【在 C**********n 的大作中提到】 : 谢谢, : 请问那怎么避免重合呢? : 加const可以吗?
|
C**********n 发帖数: 100 | 23 谢谢,请问如何特殊处理呢?
是不是可以再malloc一个区间?
【在 c*********n 的大作中提到】 : 不是避免是,检测重合,然后对重合的情况特殊处理
|
C**********n 发帖数: 100 | 24 第二题怎么做最优啊?
【在 n***n 的大作中提到】 : 希望能有大家的加油.也希望大家good luck. : Q1: write a function to implement the function memcopy : This one is not testing for the overlap. The interviewer asked how to optimize this loop. And you need to take into account the alignment issue. : Q2: Given two list of strings, find the commmon one. : list1: : apple : orange : list2: : apple : mongo
|
c*********n 发帖数: 1057 | 25 判断overlap的情况,一种是从后面开始copy一种从前面开始,你画个图就知道了
【在 C**********n 的大作中提到】 : 谢谢,请问如何特殊处理呢? : 是不是可以再malloc一个区间?
|
C**********n 发帖数: 100 | 26 thanks,我想问的是判定overlap之后如何特殊处理。
【在 c*********n 的大作中提到】 : 判断overlap的情况,一种是从后面开始copy一种从前面开始,你画个图就知道了
|
c*********n 发帖数: 1057 | 27 我的理解就是一种从尾巴开始copy一种从头开始啊
【在 C**********n 的大作中提到】 : thanks,我想问的是判定overlap之后如何特殊处理。
|
C**********n 发帖数: 100 | 28 如果都有overlap呢?
【在 c*********n 的大作中提到】 : 我的理解就是一种从尾巴开始copy一种从头开始啊
|
m*****f 发帖数: 1243 | 29 按理说, memcopy不用考虑overlap的情况的, memmove才需要
【在 c*********n 的大作中提到】 : 判断overlap的情况,一种是从后面开始copy一种从前面开始,你画个图就知道了
|
m*****f 发帖数: 1243 | 30 第二题普通数据, 就简单的用hash table就可以了吧。
估计会延伸到海量数据, 那我想就是建trie最好
【在 C**********n 的大作中提到】 : 第二题怎么做最优啊?
|
|
|
r*****q 发帖数: 1511 | |
b***e 发帖数: 1419 | 32 trie
【在 C**********n 的大作中提到】 : 第二题怎么做最好啊? : hash?
|
w*********l 发帖数: 1337 | 33 其实吧,memcpy是不应该handle overlap的。如果有overlap应该用memmove.
【在 c*********n 的大作中提到】 : 除了handle不同的overlap外,还需要注意什么呢?
|
g**u 发帖数: 583 | |