由买买提看人间百态

topics

全部话题 - 话题: memcopy
(共0页)
f*****d
发帖数: 2285
1
版上把L家的国人面试官黑的太狠。说说我1年半前L家的面试经历。
两次店面,第二次店面是个国人大哥,一开始闲聊了30分中喜欢什么project,后30分
钟做一个非常简单的题。依稀记得是实现memcopy,当时一直做leetcode,突然让写
memcopy的实现,一下子也没有思路。国人大哥基本一路提示,教我如何正确写代码
。。。 但是店面结束,心想一定挂了,结果第二天,recruiter发邮件说要onsite,心
里也是很感谢国人大哥的。
L家Onsite。面的infrastructure组,一共面了7轮(不算午饭)。从早上10点到晚上6点
半。。。为啥会是到6点半呢?因为最后一轮,实在太累了,好心的面试官给了1个半小
时的时间。。。。
说说On-Site的过程,
1面,和infrasture的director talk。基本属于闲聊,主要聊project,director会问
问project的细节。
2面,国人大哥+美国小哥,L家的面试都是两个人,一个人讲话,一个人做记录,这轮
是美国小哥讲话,国人大哥做笔记,美国小哥,第一题挺容易的,第二题作为第一题的
展开就难了,考得是data... 阅读全帖
n***n
发帖数: 1037
2
希望能有大家的加油.也希望大家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.
m*****f
发帖数: 1243
3
按理说, memcopy不用考虑overlap的情况的, memmove才需要
s*******s
发帖数: 1568
4
来自主题: JobHunting版 - 刚面完的2道题,我做的稀烂
bloomberg?
1) memcopy remove's next node to current mem space of remove.
2) 7

3
o****m
发帖数: 633
5
来自主题: JobHunting版 - firmware engineer@apple电面
呵呵,firmware是不能用python写的。
呵呵,有时候连memcopy都要自己写。
d**********x
发帖数: 4083
6
来自主题: JobHunting版 - LinkedIn 面经
you are right.
memmove handles this, while memcopy and strcpy don't.
n****e
发帖数: 678
7
来自主题: JobHunting版 - LinkedIn 面经
为什么memcopy 和 strcpy 不需要呢?
a********9
发帖数: 129
8
来自主题: JobHunting版 - google, vmware 面经
google面的是SRE
电面是国人大哥,一些c语言的pointer问题,然后一道leetcode原题
onsite1:
1)combination,还是没dupliate的,要把结果保存起来,我说用linked list,因为是
用c写,还要自己implement linkedlist, 略坑爹
2) 就是很简单的统计两个string分别有多少个单独的letter
onsite2:
bst inorder iterator
onsite3:
一个文件,每行是rack_name + machine id,输出每个rack有多少个machine,按大小排
序,我是先扫一遍存hashtable,再存进linkedlist再sort,这回没让我实现hashtable
跟linkedlist了,不过要我把用过的api单独再declear一下,最后再写个mergesort
onsite4:
有很多个machine,要求检测哪些die了,要求parallel,就写了一个for loop创建若干
个thread来执行任务,有点thread pool的感觉,用一个array来表示哪个machine被检... 阅读全帖
a*********i
发帖数: 86
9
国人哥们主面, 小印跟班. 面Backend infra
给了一道这样的题
/*
Question Description: You are to write an abstraction layer for a persistent
buffer. Provide an implementation of the following abstract class:
*/
public abstract class pBuffer {
protected final int BLOCK_SIZE = 1024;
protected final int BLOCK_COUNT = 1024;
protected byte[] buffer = new byte[BLOCK_COUNT * BLOCK_SIZE]; // A sample
1mb buffer, to be allocated in 1k chunks.
public pBuffer() {
fillBufferFromFile(); // Reads the buffer from file an... 阅读全帖
t*********r
发帖数: 387
10
虽然碰到这种非主流店面题换了谁都可能磕磕碰碰,但这年头各种阿猫阿狗都觉得面试
官非LEETCODE原题就是坑
这什么心态?面试官出算法题被喷,出非算法题也被喷
说实话看到LZ说自己精通BYTE ARRAY操作我就笑了,这题得精髓压根就不在于这个
人家看你会不会搞PERSISTENT STORAGE, 要你写个类似与FS之类的东西,你还在这BB
circular buffer, memcopy
你不会做题不是你的错,你但怨人家BACKEND INFRA出SYSTEM题就不对了
c*********l
发帖数: 3438
11
【 以下文字转载自 JobHunting 讨论区 】
发信人: advancedhei (高级嘿), 信区: JobHunting
标 题: 刚刚和L的同胞电面完, 觉得是个很好的故事
发信站: BBS 未名空间站 (Thu May 14 14:25:31 2015, 美东)
国人哥们主面, 小印跟班. 面Backend infra
给了一道这样的题
/*
Question Description: You are to write an abstraction layer for a persistent
buffer. Provide an implementation of the following abstract class:
*/
public abstract class pBuffer {
protected final int BLOCK_SIZE = 1024;
protected final int BLOCK_COUNT = 1024;
protected byte[] buffer = new byte[BLOCK_COUNT * BLOCK_... 阅读全帖
c*********l
发帖数: 3438
12
【 以下文字转载自 JobHunting 讨论区 】
发信人: advancedhei (高级嘿), 信区: JobHunting
标 题: 刚刚和L的同胞电面完, 觉得是个很好的故事
发信站: BBS 未名空间站 (Thu May 14 14:25:31 2015, 美东)
国人哥们主面, 小印跟班. 面Backend infra
给了一道这样的题
/*
Question Description: You are to write an abstraction layer for a persistent
buffer. Provide an implementation of the following abstract class:
*/
public abstract class pBuffer {
protected final int BLOCK_SIZE = 1024;
protected final int BLOCK_COUNT = 1024;
protected byte[] buffer = new byte[BLOCK_COUNT * BLOCK_... 阅读全帖
x**********d
发帖数: 693
13
我想把CPU上的一个double数组拷贝靠GPU的complexdouble数组,然后处理完之再把GPU
的complexdouble数组拷贝到CPU的double数组。。
思路就是host的double数组赋值到host的complexdouble数组,然后host的
complexdouble数组memcopy到device的complexdouble数组,and the vice versa。。。
不知道哪里错了。。大神们给看下呗。。感激不尽。。
/////// Host to Device
double *h_data= new double[height*width];
cufftDoubleComplex *h_idata;
h_idata=new cufftDoubleComplex[width * height];
cufftDoubleComplex *d_idata;
cudaMalloc((void**)&d_idata,sizeof(cufftDoubleComplex)*width*height);
for(int i=0;i阅读全帖
(共0页)