📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
回复: 6
跳转到指定楼层
上一主题 下一主题
收起左侧

字节跳动挂经

全局:

2019(4-6月) 码农类General 本科 实习@字节跳动 - 网上海投 - 技术电面  | Fail | 应届毕业生

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

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
1. 把url输入进浏览器跳转网页的过程发生了什么. Χ
2.process之间怎么交流
3.http和https有什么区别?. Χ
4.process和thread有什么区别?
5.有什么design pattern
6.写一下java singleton.1point3acres
  1. // not thread safe. Waral dи,
  2. public class Singleton {  
  3.     private static Singleton instance;  
  4.     private Singleton (){}  
  5.   .--
  6.     public static Singleton getInstance() {  . 1point3acres
  7.     if (instance == null) {  . ----
  8.         instance = new Singleton();  
  9.     }  
  10.     return instance;  
  11.     }  
  12. }  
复制代码



  1. // thread safe. check 1point3acres for more.
  2. public class Singleton {  -baidu 1point3acres
  3.     private static Singleton instance;  
  4.     private Singleton (){}  
  5.     public static synchronized Singleton getInstance() {  
  6.     if (instance == null) {  
  7.         instance = new Singleton();  
  8.     }  
  9.     return instance;  . ----
  10.     }  
  11. }  
复制代码



写一下atoi
  1. ublic int myAtoi(String str) {
  2.         // if input string is empty, return 0
  3.         if (str == null || str.isEmpty())
  4.                 return 0;.google  и

  5.         // save input string size
  6.         int n = str.length();

  7.         // skip spaces
  8.         int index = 0; ..
  9.         while (index < n && str.charAt(index) == ' ') {. check 1point3acres for more.
  10.                 index++;
  11.         }

  12.         // reached the end of string, return 0
  13.         if (index == n) ..
  14.                 return 0;
  15. .google  и
  16.         // calculate sign. From 1point 3acres bbs
  17.         int sign = str.charAt(index) == '-' ? -1 : 1;
  18. . check 1point3acres for more.
  19.         // move to next char if sign is present
  20.         if (str.charAt(index) == '-' || str.charAt(index) == '+') {
  21.                 index++;
  22.         }

  23.         // reached the end of string, return 0
  24.         if (index == n)
  25.                 return 0;.1point3acres
  26. . 1point3acres.com
  27.         // calculate max value without last digit
  28.         // -2,147,483,647 -> -2,147,483,64
  29.         int max = Integer.MAX_VALUE / 10;
  30.         // calculate last digit
  31.         // 2,147,483,647 -> 7 or -2,147,483,648 -> 8-baidu 1point3acres
  32.         int lastMaxDigit = sign > 0 ? Integer.MAX_VALUE - max * 10 : -(Integer.MIN_VALUE + max * 10);

  33.         // result without sign
  34.         int number = 0;. Χ
  35.         // loop until end or until character is digit
  36.         while (index < n && str.charAt(index) >= '0' && str.charAt(index) <= '9') {.--
  37.                 // convert character to digit
  38.                 int digit = str.charAt(index) - '0';
  39.                 // if number is greater than max without last digit
  40.                 // or number is equal max without last digit but last digit is greater then max last digit
  41.                 // return integer max or min, depend on sign
  42.                 if (number > max || number == max && digit >= lastMaxDigit) {
  43.                         return sign > 0 ? Integer.MAX_VALUE : Integer.MIN_VALUE;
  44.                 }

  45.                 // accumulate current digit to result
  46.                 number = number * 10 + digit;
  47.                 // move to next character.--
  48.                 index++;
  49.         }

  50.         // add sign to number and return result. Waral dи,
  51.         return sign * number;
  52. }
复制代码



. From 1point 3acres bbs

补充内容 (2019-8-20 15:39):
附一个楼主准备面试的时候从newcoder爬下来的面经:
https://docs.google.com/document ... jU/edit?usp=sharing

评分

参与人数 7大米 +48 收起 理由
hptg1994 + 1 给你点个赞!
emersonxsu + 1 赞一个
Harue_Go + 2 谢谢分享!
oscarpoint + 1 很有用的信息!
admin + 40

查看全部评分


上一篇:微软北京面经
下一篇:字节跳动2019校招数据分析一面面筋 求加米
🔗
FeFe 2019-9-1 11:08:52 来自APP | 只看该作者
全局:
谢谢卤煮分享
回复

使用道具 举报

全局:
请问楼主面的是哪个岗位呀
回复

使用道具 举报

🔗
jjjjnnn410 2019-12-11 11:27:21 | 只看该作者
全局:
楼主这个是什么职位呀
回复

使用道具 举报

🔗
Warren 2019-12-11 14:49:28 | 只看该作者
全局:
这个还是比较简单啊
回复

使用道具 举报

🔗
 楼主| cecilianxf 2019-12-14 18:06:19 | 只看该作者
全局:
会飞的猪猪侠 发表于 2019-12-5 15:38
请问楼主面的是哪个岗位呀

java backend
回复

使用道具 举报

🔗
 楼主| cecilianxf 2019-12-14 18:06:41 | 只看该作者
全局:
Warren 发表于 2019-12-11 14:49-baidu 1point3acres
这个还是比较简单啊

. From 1point 3acres bbs刚上完大一去面的 还是太年轻。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

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