回复: 10
跳转到指定楼层
上一主题 下一主题
收起左侧

无人车公司C++面试题 (求讨论)

全局:

2017(10-12月) 码农类General 硕士 全职@start up - 网上海投 - 技术电面  | | Fail | 在职跳槽

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

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

x
挂在这轮C++面试上了,求elegant的solution。 我后来调出了用inheritance和vector<std::function>的方法,但都感觉不够好。大家讨论讨论。。。
/*
We are working on a batch image processing pipeline. We want to be able to list
the operations to be applied on all the images (and their parameters) in a
config file. For example:

ConvertToGrayScale
Blur 3.
Resize 256 256
BlendWith

The idea is to load the config file, create the pipeline, and process all the
images through the pipeline. We have access to a library for image manipulation
that has all the functions that we need for those operations.

How would you design such a pipeline?
This is intentionally vague, so part of the exercise is to define the scope.
Keep in mind that you have 30 minutes, so you are encouraged to first go for
a decently simple solution, and then discuss extensions.

In this case we will mock the behavior because we don't have IO, so basically
it should print:

one: Converting to gray scale
one: Blurring with factor 3
one: Resizing img with x = 256 and y = 256
one: Blending with
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
main() {

// Read the config file
vector<string> cmds = { "ConvertToGrayScale",
"Blur 3.",
"Resize 256 256",
"BlendWith " };

vector<Image> imgs = { Image("one"),
Image("two"),
Image("three") };

// Your work goes here


return 0;
}

评分

参与人数 2大米 +33 收起 理由
匿名用户-8LUAW + 30
Z君 + 3 谢谢大神的代码参考,学习了!

查看全部评分


上一篇:活坡 实习 OA
下一篇:脸书面经 电面+onsite+加面

本帖被以下淘专辑推荐:

  • · Cruise|主题: 12, 订阅: 0
推荐
magicsets 2017-12-4 08:20:35 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies

评分

参与人数 2大米 +42 收起 理由
crazybadboy + 2 很有用的信息!
匿名用户-8LUAW + 40

查看全部评分

回复

使用道具 举报

🔗
 楼主| foreverzad 2017-12-4 08:43:44 | 只看该作者
全局:
太牛了~~这个C++功底深厚啊~~,还没看完但感觉满足了面试官所有的要求~
回复

使用道具 举报

🔗
 楼主| foreverzad 2017-12-4 13:45:33 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
回复

使用道具 举报

🔗
snmnmin 2017-12-4 14:19:39 | 只看该作者
全局:
哇,你把这个贴出来来,我面这个题目时完全不知道怎么下手啊,顿时感觉C++学的太烂了,要仔细学习下答案。
回复

使用道具 举报

🔗
magicsets 2017-12-4 14:28:58 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
回复

使用道具 举报

🔗
 楼主| foreverzad 2017-12-4 15:24:00 | 只看该作者
全局:
snmnmin 发表于 2017-12-4 14:19
哇,你把这个贴出来来,我面这个题目时完全不知道怎么下手啊,顿时感觉C++学的太烂了,要仔细学习下答案。

momo,我也挂了~~你最后去做无人车了吗?
回复

使用道具 举报

🔗
 楼主| foreverzad 2017-12-4 15:24:45 | 只看该作者
全局:
magicsets 发表于 2017-12-4 14:28
编译时加上-std=c++14,然后试试第114行改成:(从报错信息上来看似乎是这行代码问题,你可以把整个stack ...

ok,谢谢啊,我回头再试试~~xcode我用得不多。。。所以不熟~~
回复

使用道具 举报

🔗
bearjoe 2018-1-8 15:04:44 | 只看该作者
全局:
aimotive, yaml file
回复

使用道具 举报

🔗
bearjoe 2018-1-8 15:21:59 | 只看该作者
全局:
or autosar manifest load
回复

使用道具 举报

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

本版积分规则

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