百度秋招深圳-C++/PHP研发工程师面试杂记

引子

2018/09/19 晴
我参加了百度秋招面试, 期望方向是 PHP 研发
面试地点在广东省深圳市百度国际大厦, 粗略估计了一下我那一场的面试大概有 15~20 来人参加
https://youtu.be/nXT_wz5Gcq4
No photography

面试

流程

到场直接被安排在旁边坐下等候通知, 过了一会就有工作人员带路去面试场地
由于深圳百度是新建的大楼, 可能没有完全启用, 本次面试被安排在 14 楼食堂层
所有人都在一个大场地里, 就像高考一样分开做好面试, 挺刺激的 xD
面试了两轮, 面完二面后被告知先去等候区等候, 一会工作人员过来通知可以离场了

一面 (~ 45 min)

二面 (~ 35 min)

GETPOST
BACK button/ReloadHarmlessData will be re-submitted (the browser should alert the user that the data are about to be re-submitted)
BookmarkedCan be bookmarkedCannot be bookmarked
CachedCan be cachedNot cached
Encoding typeapplication/x-www-form-urlencodedapplication/x-www-form-urlencoded or multipart/form-data. Use multipart encoding for binary data
HistoryParameters remain in browser historyParameters are not saved in browser history
Restrictions on data lengthYes, when sending data, the GET method adds the data to the URL; and the length of a URL is limited (maximum URL length is 2048 characters)No restrictions
Restrictions on data typeOnly ASCII characters allowedNo restrictions. Binary data is also allowed
SecurityGET is less secure compared to POST because data sent is part of the URL Never use GET when sending passwords or other sensitive information!POST is a little safer than GET because the parameters are not stored in browser history or in web server logs
VisibilityData is visible to everyone in the URLData is not displayed in the URL
from collections import Counter


class Solution:
    def majorityElement(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        return Counter(nums).most_common()[0][0]

If this is asked in an interview, I think the interviewer probably
wants to see your problem solving process, not just your knowledge of
algorithms.

The description is quite general so maybe you can ask him the range or
meaning of these numbers to make the problem clear. Doing this may
impress an interviewer. If, for example, these numbers stands for
people’s age of within a country (e.g. China),then it’s a much easier
problem. With a reasonable assumption that nobody alive is older than
200, you can use an int array of size 200(maybe 201) to count the
number of people with the same age in just one iteration. Here the
index means the age. After this it’s a piece of cake to find 100
largest number. By the way this algo is called counting sort.

Anyway, making the question more specific and clearer is good for you
in an interview.

后记

说实话笔试做的挺烂的, 因为不允许跳出网页用本地 IDE
又只能用 php 导致我很多函数不记得, 书到用时方恨少了
还是被传唤去面试, 没想到一面就是一下午, 当时还担心简历带的不够
后来面完二面我简历刚好用完的时候把我赶走了, 也算是不幸中的万幸???
问了下二面面试官目前 php 在百度的发展, 答曰需求不大, 多为老项目维护
也难怪岗位名称大家都喊斜杠前面的而忽略掉斜杠后面的 ?

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值