一亩三分地论坛

 找回密码
 获取更多干货,去instant注册!

扫码关注一亩三分地公众号
查看: 1292|回复: 6
收起左侧

Mathworks 电面

[复制链接] |试试Instant~ |关注本帖
aojing 发表于 2016-3-3 12:27:56 | 显示全部楼层 |阅读模式

2016(1-3月) 码农类 硕士 全职@Mathworks - 校园招聘会 - 技术电面 |Otherfresh grad应届毕业生

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看,没有帐号?获取更多干货,去instant注册!

x

上周的OA做的不好,但是还是收到电面
细节和网上提到的差不多,分3个section,只需要选两种语言,其他的她都默认我oop和probility.1point3acres缃
三姐语速略快,好几个问题没听懂,最后她打出来给我看了
一共50分钟左右,感觉已跪,求奇迹

java:
static
tread class
try/catch/finally
manual gc
deconstructor
arraylist vs vector
linkedlist
graph
binary tree vs binary search tree time complexity
hashtable
很多看code说输出
. more info on 1point3acres.com
python:
strong type, dynamic type
distionary
constructor
看code说输出. 鐗涗汉浜戦泦,涓浜╀笁鍒嗗湴
. 1point3acres.com/bbs
oop:
oop
multitreading
design a parking garage
.鏈枃鍘熷垱鑷1point3acres璁哄潧
math:
probility of 400 people, at least two share birthday
two nxn matrix multiply, time complexity
graph with n vertices, min edge
-3, -5 -8....the 101th number
4 face dice and 6 face dice, probility of same number

网上的面筋整理,晚点再回来写

chuweihan 发表于 2016-3-6 04:27:00 | 显示全部楼层
楼主求下整理的网上面经 多谢啦
回复 支持 反对

使用道具 举报

qiuqiyuan 发表于 2016-3-8 04:37:11 | 显示全部楼层
求楼主整理的面经。
回复 支持 反对

使用道具 举报

 楼主| aojing 发表于 2016-3-8 05:13:42 | 显示全部楼层
Java & oop

1. what is oop? what are the advantages of oop?.鏈枃鍘熷垱鑷1point3acres璁哄潧

2. how to import packages in java? what if you import a package twice?.鏈枃鍘熷垱鑷1point3acres璁哄潧

3. what is polymorphism? have you ever used polymorphsim in a project? Describe it.

4. how to implement a queue using stacks?

. From 1point 3acres bbs5. what is java generics?
Java Generic methods and generic classes enable programmers to specify, with a single method declaration, a set of related methods or, with a single class declaration, a set of related types, respectively.. Waral 鍗氬鏈夋洿澶氭枃绔,
A generic class is defined with the following format:
class name<T1, T2, ..., Tn> { /* ... */ }

Generics also provide compile-time type safety that allows programmers to catch invalid types at compile time.

6. what is the difference between abstract class and interface?

abstract Classes        Interfaces

7. difference between final and finally
8. what is mutex?
When I am having a big heated discussion at work, I use a rubber chicken which I keep in my desk for just such occasions. The person holding the chicken is the only person who is allowed to talk. If you don't hold the chicken you cannot speak. You can only indicate that you want the chicken and wait until you get it before you speak. Once you have finished speaking, you can hand the chicken back to the moderator who will hand it to the next person to speak. This ensures that people do not speak over each other, and also have their own space to talk.
Replace Chicken with Mutex and person with thread and you basically have the concept of a mutex.
A Mutex is a mutually exclusive flag. It acts as a gate keeper to a section of code allowing one thread in and blocking access to all others. This ensures that the code being controled will only be hit by a single thread at a time. Just be sure to release the mutex when you are done

        Mutex is basically mutual exclusion. Only one thread can acquire the resource at once. When one thread acquires the resource, no other thread is allowed to acquire the resource until the thread owning the resource releases. All threads waiting for acquiring resource would be blocked..鏈枃鍘熷垱鑷1point3acres璁哄潧
Semaphore is used to control the number of threads executing. There will be fixed set of resources. The resource count will gets decremented every time when a thread owns the same. When the semaphore count reaches 0 then no other threads are allowed to acquire the resource. The threads get blocked till other threads owning resource releases.. 涓浜-涓夊垎-鍦帮紝鐙鍙戝竷
In short, the main difference is how many threads are allowed to acquire the resource at once ?. From 1point 3acres bbs
•        Mutex --its ONE.
•        Semaphore -- its DEFINED_COUNT, ( as many as semaphore count)


9. difference between int and integer in java

10. is java pass by reference or pass by value?
By value
11. can java garbage collection manually? how?
鏉ユ簮涓浜.涓夊垎鍦拌鍧. Yes, but not recommended. By call system.gc() which will call runtime.gc()
12. difference between JDK and JRE.
JRE: Java Runtime Environment. It is basically the Java Virtual Machine where your Java programs run on. It also includes browser plugins for Applet execution.
JDK: It's the full featured Software Development Kit for Java, including JRE, and the compilers and tools (like JavaDoc, and Java Debugger) to create and compile programs.. 1point 3acres 璁哄潧
Usually, when you only care about running Java programs on your browser or computer you will only install JRE. It's all you need. On the other hand, if you are planning to do some Java programming, you will also need JDK.

13. what is static? 然后写了如下代码让我说输出是什么
static members belong to the class instead of a specific instance.
It means that only one instance of a static field exists[1] even if you create a million instances of the class or you don't create any. It will be shared by all instances.
Since static methods also do not belong to a specific instance, they can't refer to instance members (how would you know which instance Hello class you want to refer to?). staticmembers can only refer to static members. Instance members can, of course access staticmembers.

void func() {
static int x = 0;-google 1point3acres
printf(“%d\n”, x);. from: 1point3acres.com/bbs
x = x + 1;. 涓浜-涓夊垎-鍦帮紝鐙鍙戝竷
}
int main(int argc, char *argv[]) {. From 1point 3acres bbs
func();
func();
func();. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
return 0;
}
14. 关于java里的super关键字,可惜我记不太清楚了,大概写一下,如果我写错了,希望大家斧正
super class A{
foo();
}
class B extends A{. 1point3acres.com/bbs. from: 1point3acres.com/bbs
foo();
bar();
}
int main{. From 1point 3acres bbs
A var = new B();
var.foo();
var.bar();
}
问这个foo和bar调用的是A的还是B的
15.Compare the time complexity of insertion and deletion between dynamic array and linkedlist. visit 1point3acres.com for more.
16. what is hashtable? what is the potential issue of hashtable?
Fixed size table of array
Constant time insertion

这个楼主没懂,就问了一句,他引导我从“garbage collection”上面去考虑,可惜楼主还是没想到
面完之后查了一下,似乎是想考hashtable当key被回收而value没有被回收的时候,会发生内存泄露。
17.difference between hashtable and hashmap in java
1.        The HashMap class is roughly equivalent to Hashtable, except that it is non synchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesn't allow nulls)..鏈枃鍘熷垱鑷1point3acres璁哄潧
2.        HashMap does not guarantee that the order of the map will remain constant over time.. 鐗涗汉浜戦泦,涓浜╀笁鍒嗗湴
3.        HashMap is non synchronized whereas Hashtable is synchronized.. 鐣欏鐢宠璁哄潧-涓浜╀笁鍒嗗湴
4.        1) HashMap's iterators are NOT fail-safe. They are fail-fast. There is a huge difference in meaning between those two terms. 2) There is no set operation on a HashMap. 3) The put(...) operation won't throwIllegalArgumentException if there was a previous change. 4) The fail-fast behaviour of HashMap alsooccurs if you change a mapping. 5) The fail-fast behaviour is guaranteed. (What is not guaranteed is the behaviour of a HashTable if you make a concurrent modification. The actual behaviour is ... unpredictable.) 鏉ユ簮涓浜.涓夊垎鍦拌鍧.


回复 支持 反对

使用道具 举报

 楼主| aojing 发表于 2016-3-8 05:19:01 | 显示全部楼层
18. Are there destructors in Java? How do you call them?
19. Mother Father are two classes Child is child - how to implement this in Java?
20. Arraylist or Vector?
21. How to access the static methods of a class? - involving reflections.
You can invoke a static method via reflection like this :. more info on 1point3acres.com
Method method = clazz.getMethod("methodname", argstype);
Object o = method.invoke(null, args);
22. implement a sorting algorithm. 鐗涗汉浜戦泦,涓浜╀笁鍒嗗湴


Python:
Are python strings mutable,
The string objects themselves are immutable.
The variable, a, which points to the string, is mutable.
how to create a constructor in Python . 涓浜-涓夊垎-鍦帮紝鐙鍙戝竷
Is Python strongly typed?
What does it mean when a language is dynamically typed
. 涓浜-涓夊垎-鍦帮紝鐙鍙戝竷Dictionaries?
. Waral 鍗氬鏈夋洿澶氭枃绔,Libraries?

回复 支持 反对

使用道具 举报

 楼主| aojing 发表于 2016-3-8 05:20:55 | 显示全部楼层
Math
1. rank of a matrix
2. nullspace of a matrix
N={vector x beclogs to R| A*X=0}
3. singular matrix
No inverse matrix,|A|=0
4. eigenvalues/eigenvectors
5. derivative; describe it using limits .1point3acres缃
6. 一个四面的色子,一个六面的色子,掷出一样点数的概率。
7. 370人同一天生日的概率,364人呢?
8. 全班40人,需要修英语和德语中的一门或两门,修英语的32,修德语和英语的5人,修德语的多少
回复 支持 反对

使用道具 举报

qiuqiyuan 发表于 2016-3-8 05:28:56 | 显示全部楼层
mutex的解释用rubber duck这个例子太形象了,一下就说清楚了。
回复 支持 反对

使用道具 举报

本版积分规则

请点这里访问我们的新网站:一亩三分地Instant.

Instant搜索更强大,不扣积分,内容组织的更好更整洁!目前仍在beta版本,努力完善中!反馈请点这里

关闭

一亩三分地推荐上一条 /5 下一条

手机版|小黑屋|一亩三分地论坛声明 ( 沪ICP备11015994号 )

custom counter

GMT+8, 2016-12-9 19:37

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

快速回复 返回顶部 返回列表