0%

在2020年1月15日左右找人内推简历,第二天收到HR面试邀请,约了2月上旬,面试岗位:Java后台研发实习(广告业务组)。

一面技术面(约60分钟)

Read more »

Question

On a 2-dimensional grid, there are 4 types of squares:

1 represents the starting square. There is exactly one starting square.
2 represents the ending square. There is exactly one ending square.

Read more »

线程池

管理线程,避免增加创建线程和销毁线程的资源损耗。因为线程其实也是一个对象,创建一个对象,需要经过类加载过程,销毁一个对象,需要走GC垃圾回收流程,都是需要资源开销的。
提高响应速度。 如果任务到达了,相对于从线程池拿线程,重新去创建一条线程执行,速度肯定慢很多。
重复利用。 线程用完,再放回池子,可以达到重复利用的效果,节省资源。

Read more »

内存分配

  • 程序计数器
  • 虚拟机栈(java方法服务)与本地方法栈(native方法服务)
  • 堆区 存放实例对象 可达性算法
  • 方法区 (已被加载的类信息,常量,静态变量)运行时常量池(方法区一部分)
  • 直接内存(NIO)
Read more »

Question

We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11).

Now given a string represented by several bits. Return whether the last character must be a one-bit character or not. The given string will always end with a zero.

Example 1:
Input:
bits = [1, 0, 0]
Output: True
Explanation:
The only way to decode it is two-bit character and one-bit character. So the last character is one-bit character.

Read more »