ARTS Week 002

Algorithm

Leetcode 2. Add Two Numbers

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.

You may assume the two numbers do not contain any leading zero, except the number 0 itself.

Example:

Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Output: 7 -> 0 -> 8
Explanation: 342 + 465 = 807.
public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
    ListNode dummyHead = new ListNode(0);
    ListNode p = l1, q = l2, curr = dummyHead;
    int carry = 0;
    while (p != null || q != null) {
        int x = (p != null) ? p.val : 0;
        int y = (q != null) ? q.val : 0;
        int sum = carry + x + y;
        carry = sum / 10;
        curr.next = new ListNode(sum % 10);
        curr = curr.next;
        if (p != null) p = p.next;
        if (q != null) q = q.next;
    }
    if (carry > 0) {
        curr.next = new ListNode(carry);
    }
    return dummyHead.next;
}

Review

Understand, Design, Build: A Framework for Problem-Solving

「解决问题的框架:理解、设计和执行」

新程序员有一个普遍的误解:最厉害的程序员就是写代码最厉害的那个人。但是我们的工作不是写代码,而是找到并解决问题,以此来推动业务的前进。写出好的代码是一项必备技能,但还远远不够。

Tip

我们做培训,首先当然是设定目标。现在大多数培训目标还是这样描述的:了解什么,掌握什么,精通什么。我认为,目标一旦这样描述,培训的效果就很难衡量。所以培训的目标应该是表现性目标——培训后学员应该有什么样的表现。

表现性目标聚焦在学员的具体行为表现上,改变什么态度,完成什么任务,解决什么问题。换句话说,课程目标应该表述成让学员有潜在的行为表现。

这个培训目标的设定的小 Tip 让我很受启发,不过这个对于培训过程和内容提出了挑战。

Share

这段时间在忙新人培训的事情,这一批新人是二月下旬社招进来的。这次培训整体感觉效果不是很好,一方面在反思培训方法的问题,另一方面也在考虑统一面试评分标准。因为当时简历太多,为了增加效率,将简历分配给了很多技术同事各自面试,可能每个人的标准和面试风格不太统一,招进来的新人参差不齐。

这让记起之前看过的一篇文章 马云都吃过很多亏!招聘权,绝对不能下放,标题虽然有点「震惊」风格,但感觉还是挺有道理的。我也在想,以我司这种项目交付的模式,对人员的需求量太大,如果招聘权不下放,全部由大佬亲自面试,也不太可能。所以退而求其次,尽量在招聘面试的时候统一标准,而且要适当提高标准,这样才有可能在招聘的时候筛选到真正需要的人。

posted @ 2019-03-31 23:05  木有Some  阅读(162)  评论(0编辑  收藏  举报