查看: 2614| 回复: 0
跳转到指定楼层
上一主题 下一主题
收起左侧

[找工就业] 快门飞 code challenge

全局:

2017(4-6月)-EE硕士+3个月-1年 | 网上海投| 码农类General全职@shutterfly

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

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

x
收到一个code challenge立刻分享起来。. Χ
One way to analyze acquisition strategy and estimate marketing cost is to calculate the Lifetime Value (“LTV”) of a customer. Simply speaking, LTV is the projected revenue that customer will generate during their lifetime.
A simple LTV can be calculated using the following equation: 52(a) x t. Where a is the average customer value per week (customer expenditures per visit (USD) x number of site visits per week) and t is the average customer lifespan. The average lifespan for Shutterfly is 10 years.
Code Requirements
Write a program that ingests event data and implements one analytic method, below. You are expected to write clean, well-documented and well-tested code. Be sure to think about performance - what the performance characteristic of the code is and how it could be improved in the future.
You may use one of the following OO languages: Java, Python, Scala.
Ingest(e, D)
Given event e, update data D
TopXSimpleLTVCustomers(x, D)
Return the top x customers with the highest Simple Lifetime Value from data D.
Please note that the timeframe for this calculation should come from D. That is, use the data that was ingested into D to calculate the LTV to frame the start and end dates of your LTV calculation. You should not be using external data (in particular "now") for this calculation.
Events
Please use the following sample events the Data Warehouse collects from Shutterfly’s public sites. All events have a key and event_time, but are received with no guaranteed order and with fluctuating frequency.
See sample_input directory for a sample of each event.
Customer
  • type *
    • CUSTOMER.--
  • verb *
    • NEW
    • UPDATE
  • Additional Data
    • key(customer_id) *
    • event_time *
    • last_name
    • adr_city
    • adr_state
      . .и

Site Visit
  • type *
    • SITE_VISIT
  • verb *
    • NEW
  • Additional Data
    • key(page_id) *
    • event_time *
    • customer_id *
    • tags (array of name/value properties)

Image Upload
  • type *
    • IMAGE
  • verb *
    • UPLOAD. Χ
  • Additional Data
    • key(image_id) *
    • event_time *
    • customer_id *
    • camera_make
    • camera_model

Order
  • type *
    • ORDER
  • verb *
    • NEW
    • UPDATE
  • Additional Data
    • key(order_id) *
    • event_time *
    • customer_id *
    • total_amount *

* represents required data
Directory structure
This project has the following directories, and it is expected that your code will follow the same structure.
- README.md- src (your source will live here)- input (input file you create as proof of functionality lives here)- output (output file with the result of TopXSimpleLTVCustomers(10, D). Include the calculated LTV.)- sample_input (one event of each type for visualization purposes)Reference
-baidu 1point3acres

评分

参与人数 1大米 +2 收起 理由
randomjump + 2 给你点个赞!

查看全部评分


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

本版积分规则

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