注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
之前有发过一个帖子讲 关于 OS,embedded 和 firmware 找工作和面试的帖子: https://www.1point3acres.com/bbs/thread-1025763-1-1.html
现在准备开始发 我遇到和准备过的一些相关的题 这里就假设大家有基础的知识
大约每周一两道 大家可以一起讨论 我也会后面发表我的觉得的答案 和一些要注意的细节
-baidu 1point3acres
1.
Given the following class with 2 methods
class MySystem {.1point3acres
/**
* Waits durationMillis milliseconds then runs the callback. ..
*
* Only one timer can be pending at one time. If called again before the
* duration expires, the original timer is overwritten without running
* callback.
*/
static void setTimer(long durationMillis, Runnable callback);
/** Returns the current time in milliseconds since system boot. */
static long getCurrentTimeMillis();
}
Use these methods to implement the 3rd method to support multiple timers:. 1point3acres
/**
* Waits durationMillis milliseconds then runs the callback.
*
* Supports multiple concurrent timers. Calling addTimer will not break. ----
* any previously started timers.-baidu 1point3acres
*/
void addTimer(long durationMillis, Runnable callback);
. ----
Usage is as follows:
.
MySystem sys = new MySystem();
sys.addTimer(100, runnable1);
Thread.sleep(50);.1point3acres
sys.addTimer(100, runnable2);. 1point3acres
2.. Waral dи,
. 1point 3acres
you have a very large binary file.
For each row you need to reverse the bits inside.
参考 https://leetcode.com/problems/reverse-bits/description/ |