阿里java一面面经

0.专业,毕业时间
1.自我介绍
2.数组和链表有什么区别
3.map,set,stack(太紧张了没听清)
4.hashmap读场景特别多,写场景比较少,改变策略
5.内存泄漏,如何定位排查
6.死锁
7.除了java还学过哪些东西
8.问项目
9.有没有参加过编程类竞赛(没有)
10.实习时间可以保证不
11.有一份ip地址和地理位置的缓存(写一个方法)从内存和效率上考虑
(目测已凉,人生中第一次面试太紧张了)

#实习##内推##春招##面经##阿里巴巴#
全部评论
面试阿里学长最后去了哪里呀?
点赞 回复 分享
发布于 2021-12-31 14:57
楼主请问你第四题怎么答的
点赞 回复 分享
发布于 2018-03-15 14:01
搭车打个广告: 上海支付宝实习生招聘:https://www.nowcoder.com/discuss/67460 咨询可留言、可私信。
点赞 回复 分享
发布于 2018-03-15 10:14
楼主是19届的吗
点赞 回复 分享
发布于 2018-03-15 10:07
同第一次刺激面试,已凉
点赞 回复 分享
发布于 2018-03-15 08:16
11.有一份ip地址和地理位置的缓存(写一个方法)从内存和效率上考虑 这个题是啥意思啊?
点赞 回复 分享
发布于 2018-03-14 21:57
刚刚也是完成一面,紧张,都不知道自己说的啥
点赞 回复 分享
发布于 2018-03-14 21:49
其实大家都很紧张,回答问题的时候都是知道吐不出来,第一次面试贡献感觉超级刺激
点赞 回复 分享
发布于 2018-03-14 21:34
什么岗位呢?
点赞 回复 分享
发布于 2018-03-14 20:42
是根据简历上问的吗
点赞 回复 分享
发布于 2018-03-14 20:01
m
点赞 回复 分享
发布于 2018-03-14 19:27
同今天,目测凉透了
点赞 回复 分享
发布于 2018-03-14 19:19
晚上8点面试 还没面 就已经凉了
点赞 回复 分享
发布于 2018-03-14 18:56
内存泄露那里你怎么答
点赞 回复 分享
发布于 2018-03-14 18:38

相关推荐

0816 京东笔试答案第一题, 减少逆序对数量对于每个 ai, 找到 所有 aj = a[i] + 1 且 j < i 的 j, 则对于选择 j < L <= i 的 L 贡献 +1, 然后做一个前缀和取最大值即可代码```#include <iostream>#include <cstring>#include <algorithm>#include <vector>#include <unordered_map>using namespace std;void solve(){int n; cin >> n;vector<int> a(n + 10, 0), b(n + 10, 0), c(n + 10, 0);unordered_map<int, vector<int>> pos;for (int i = 1; i <= n; i ++){cin >> a[i];}for (int i = 1; i <= n; i ++){int v =a[i];int t = v + 1;if (pos.find(t) != pos.end()){for (int j : pos[t]){if (j < i){b[j + 1] ++;b[i + 1] --;}}}pos[v].push_back(i);}int ans = 0;int tmp = 0;for (int i = 1; i <= n; i ++){tmp += b[i];ans = max(ans, tmp);}cout << ans << endl;}int main(){int _ = 1;cin >> _;while (_ --){solve();}}```第二题, 跳水打分解法类似求区间最值, 维护每个长度为 m 的区间的最大值和最小值, 然后遍历过去即可算出答案。代码```#include <bits/stdc++.h>#define PII pair<long, long>#define x first#define y secondusing namespace std;int main(){int n, m;cin >> n >> m;priority_queue<PII> maxPq;priority_queue<PII, vector<PII>, greater<PII>> minPq;vector<long long> a(n + 10);double ans = 0;long long tmp = 0;for (int i = 1; i <= n; i ++) cin >> a[i];for (int i = 1; i <= m; i ++){maxPq.push({a[i], i});minPq.push({a[i], i});tmp += a[i];}long long minV = minPq.top().x;long long maxV = maxPq.top().x;ans = double(tmp - minV - maxV) / (m - 2);int ans2 = 1;int l = 1, r = m;while (r < n){// cout << ans << endl;tmp -= a[l]; l ++;r ++; tmp += a[r];minPq.push({a[l], l}); minPq.push({a[r], r});maxPq.push({a[l], l}); maxPq.push({a[r], r});while (minPq.top().y < l) minPq.pop();while (maxPq.top().y < l) maxPq.pop();if ((double(tmp - minPq.top().x - maxPq.top().x) / (m - 2)) > ans){ans = double(tmp - minPq.top().x - maxPq.top().x) / (m - 2);ans2 = l;}}cout << ans2 << endl;}```
投递京东等公司10个岗位
点赞 评论 收藏
分享
评论
3
52
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务