注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
Mathworks 最全面经大汇总~~~
蠡口 饿灵琉 琉酒期 寺石依 乌令散 衣就 琉丝 丝食就 琉依期 饿饿吴 依舅舅 饿吴
面向对象设计:停车场 餐馆预约 参观管理 图书馆管理 送餐系统 社交网络 自动提款机 谷歌文档
刚刚面完。。。考了两个coding,和一个ood,问了一些简历。并没有像之前说的会考基础概念和数学,CPP从头到尾,也没有用第二种语言。所以面试提前结束了。1. 利口 耳凌溜。 因为我之前 oa的时候发邮件说他们题目有问题(题目有 bug),考完被面试官问为什么觉得有问题。.
我把我复习准备的资料贴在了下面,这里也感谢以下提供面经的各位小伙伴们。(导致帖子很长,但是同学们就不需要自己的大米下载啦!)。就不设限制啦,毕竟我大米也不多,非常懂没米的心酸。
大家如果觉得我的东西还能用的话,可以可以给我加个米,点下方的"评分",就可以给我加米啦~(不扣你自己的米哦!)
//**************************************************************以下是我准备的资料******************************************************************************.
Restaurant reservation online answer
int CheckTableAvailability(int NumPeople, time_t TimeOfbooking, int *tableNumber, time_t *alternativeTime)
{
if(isTable_Available(NumPeople,TimeOfBooking))
{
*tableNUmber=isTable_Available(NumPeople,TimeOfBooking);.
return 1;
}
if(alternate_time(NumPeople,TimeOfBooking))
{
alternatetime=alternate_time(NumPeople,TimeOfBooking)
return 2;
}
else
{
cout<<"no Booking possible";
return 0;
}
}
Class: Table
{
int TableId;
int SeatingCapacity;
string speciality;
}
Class Booking
{
int bookingId;
int TableId;
time_t startTime;
customerDetails;
}
Class: BookedTables
{
HashTable bookings ( key: timeslot, value: int booked[NumTables] );
// int array will contain whether the table is booked or not for this time slot. A value of 0 means not booked. A value other than 0 represents a booking id
}
My answer
enum week{Mon, Tue, Wed, Thur, Fri, Sat, Sun};
Class Table{
Int tableId;
Int serveNum;
enum tableType;
Bool isAvailable;
vector<TimeInterval> vec;
};
Class Booking{
Int bookingId;
Int tableId;
time_t startTime; time_t
time_t espectedEnd;
Time_t timeForLate;
};
Class customer {
Int customerId;
String customerName;
String contacts; //phone number
};
Parent class Table
Child classes
Customer: id-> random()
customer()
setCustomerId() ----
getCustomerId()``````
Num, time
Table->func(Num, time)
Booking
Hashtable -> table
Hashtable -> booking
Bool hasAvailableTable(int serveNum) {
}
Void bookTable(String name, stirng contacts) {
}
Void releaseTable() {
}
cancelTable()
checkInFunction
monitorFunction: thread,
https://stackoverflow.com/questions/1008019/c-singleton-design-pattern
https://www.tutorialspoint.com/Explain-Cplusplus-Singleton-design-pattern
整理的1年以内的面经以及概念题答案
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
先问对这个项目有没有了解
接着写码 被三姐出了道hard 一紧张有点蒙圈 用了O(n) space 利特口的 饲狮衣
问之前经历问了好久:自我介绍 -》详细介绍实习-》实习有没有用oop-》把用到的oop部分概括写出来.
写一个网上订餐系统的oop
问oop的好处是什么 为什么实习写的码需要用oop
有什么问题
结束……并没有问地里说的任何数学和编程概念,可能觉得码没写出来,懒得问了-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DFS & BFSom
3. OOD 的概念基本都在语言里面问了。 还问了一个Restaurant Reserve Problem,说的很是模糊,就是做一个饭店的点餐系统,可以make reservation 和 cancle reservation。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4. Math
班里45 人, 15人选英语和德语,总共18个人选英语,5个人都没选,问几个人只选德语?
32 bit signed int, max = ? how to represent it in digit?. from: 1po
编程语言选2个考,语法的那种;
数学部分一个题,就问了简单的选英语德语都选这种题;
编程一个题;.
多线程一个题;
ooad一个题;
os一个题;
你有什么要问面试官的
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matlab
· 给定一个2D matrix,每一列的数据是用不同的单位的,毫米厘米米公里,然后写code转成一样的单位
· 我一开始是每一列操作一下
· 然后面试官说要一行搞定,写了个vectorize的版本
· 给定一段code有一个nested forloop,是对每一个元素进行一个比较和赋值,要求要改成一行code直接解决
C++
· Pointer为什么要有null
It is always a good practice to assign the pointer NULL to a pointer variable in case you do not have exact address to be assigned.
· 怎么判断一个数是不是奇数
· % operator有啥用,有啥局限性 .
ONly used in Integers, not allowed for large integers
· c++ main程序怎么往里面传input,考argc argv
int main(int argc, char** argv)
{
std::cout << "Have " << argc left"> public:
~A() {
cout << "A" << endl;
}
};
class B : public A{
public :
~B() {.
cout << "B" << endl;
}
};
int main (int argc, char **argv) {.
A *ptr = new B();
delete ptr; .
return 0;
}
In the code below, how would you set p1 to point to a value of 5?
char *p1 = NULL;
Programming / Math
what is a graph, 有向 / 无向
邻接矩阵 邻接表
400人 两个人生日相同的概率
100%
(A ∩ B) U C 集合运算化简
32位表示的最大数字
解释O(n), f(n) = n, g(n) = n!, 求O(f + g)
两个N*N矩阵相乘的时间复杂度
Design
· ATM.
来自 <
来一发Mathworks面经:
是公司的猎头直接找到我然后Mathworks的Director of Engineer直接给我打电话要求面试(是个阿三)。
面之前说的是只是随便聊聊,然后我本来昨晚刚考完期末,非常累,也就并没有复习。
然而今天就悲剧了。。。。一开始简单自我介绍之后就开始突然袭击:
(1) Design Pattern
(2) Memory Leak
内存泄漏(Memory Leak)是指程序中己动态分配的堆内存由于某种原因程序未释放或无法释放,造成系统内存的浪费,导致程序运行速度减慢甚至系统崩溃等严重后果。
Memory Leak happens when the program fails to free the allocated memory space. It is a waste of memory and may compromise the security of the program.
(3) Memory Leak Detect
(4) Static in C
Static variables always exist in the process unless the process is terminated. For example, if we declare a static vairable in a funciton, the value of the variable will be stored. And we can retrieve it in the future.
For example… Code
在函数的返回类型前加上关键字static,函数就被定义成为静态函数。
函数的定义和声明默认情况下是extern的,但静态函数只是在声明他的文件当中可见,不能被其他文件所用。
https://blog.csdn.net/thanklife/article/details/78476737
(5) Math problems
内容按照顺序应该是:
1. Signal Processing
2. Java Programming
3. Matlab
4.Basic Math (linear algebra, calculus)
5. OOP concepts.
我之前也查过资料,做了一些面经的题目感觉比较简单。但是今天答的时候虽然有很多都答上来了,但发现还是有好多我没覆盖到的内容,虽然题目很简单,但有些东西是真的不记得了。
我就举几个我没答出来(或者答错了)的例子吧:
1. What is indefinite integral and definite integral? (Basic Calculus)
2. Give a matrix A, what does A.' mean? (Matlab)
3. How to plot 3 points using '*' and colored in green? (Matlab)
面完后我问了面试官两个问题,第一个是what a typical day of yours is like in Mathworks, 第二个是 how is the food in the cafeteria of Mathworks.
MATLAB
How to delete elements in array which is divisible by 5
What is BATH in MATLAB?.
搜了一下依然不知道这是什么…….
What is @ in MATLAB? (function handler) How is it different from regular function call?
|