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

JP Morgan Chase & Co. – NAMR SEP - Campus Hiring - 2024 Batch

全局:

2024(7-9月) 码农类General 本科 实习@jpmorgan - 网上海投 - 技术电面  | 😃 Positive 😐 Average | Pass | 应届毕业生

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

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

x
JP Morgan Chase 24 Summer Intern OA 新鲜面经!
新人求米~

附正确答案,test cases ALL PASS


2道题60分钟

1.Maximum Index Problem

There is an infinite array of integers numbered consecutively from 0. At each step, a pointer can move from index i to index i+j, or remain where it is. The value of i begins at 0. The value of j begins at 1 and at each step, j increments by 1. There is one known index that must be avoided. Determine the highest index that can be reached in a given number of steps.

Example:
steps = 4, badElement = 6 The pointer is limited to 4 steps and should avoid the bad item 6. Scenario 1: In the first step, j starts at 1. Move 1 unit to index 0+1=1 and j=2. At step 2, move 2 units to index 1+2=3 and j/=3. At step 3, do not move. Otherwise, the pointer will move 3 units to the bad item 6. Now i=4. At step 4, move 4 units to item 3+4=7. Scenario 2: At step 1, remain at index 0. Now j=2. At step 2, move 2 units to index 0+2=2 and j=3. At step 3, move 3 units to index 2+3=5 and j=4. At step 4, move 4 units to index 5+9. The maximum index that can be reached is 9.

答案:


2. Balanced Or Not?

Consider a string, expression consisting of the characters  <  and  >  only. We consider the string to be balanced  if each <  always appears before  (i.e., to the left of) a corresponding  >  character (they do not need to be adjacent). Moreover, each  <  and >  act as
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
t color="#ff8c00">)

def balancedOrNot(expressions, maxReplacements):
    results = []

    for i in range(len(expressions)):
        expression = expressions[i]
        replacements = maxReplacements[i]
        count = 0
        unbalanced = False

        for char in expression:
            if char == "<":
                count += 1
            elif char == ">":
                if count == 0:
                    if replacements <= 0:
                        unbalanced = True
                        break
                    replacements -= 1
                else:
                    count -= 1

        if count == 0 and not unbalanced:
            results.append(1)
        else:
            results.append(0)

    return results

谢谢各位客官赏大米~
END

评分

参与人数 8大米 +22 收起 理由
irina15 + 1 很有用的信息!
hollyhua + 1 很有用的信息!
humorblue + 1 给你点个赞!
jugoson + 1 点个赞
bryanjhy + 15 给你点个赞!

查看全部评分


上一篇:Mathworks OA
下一篇:uber电面挂经
全局:
感谢分享!想问一下楼主申请的是什么岗位呀,tech岗的oa都是同一题库吗
回复

使用道具 举报

🔗
 楼主| 微信用户_30a5189 2023-8-3 03:51:02 | 只看该作者
全局:
微信用户_zxn03 发表于 2023-8-2 05:30
感谢分享!想问一下楼主申请的是什么岗位呀,tech岗的oa都是同一题库吗

Tech岗的OA都不一样,我申请的是software engineer internship
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-7MHW8  2023-8-6 12:24:22
请问楼主,做OA需要开摄像头吗?
回复

使用道具 举报

🔗
 楼主| 微信用户_30a5189 2023-8-14 12:43:58 | 只看该作者
全局:
匿名用户 发表于 2023-8-6 00:24
请问楼主,做OA需要开摄像头吗?

不用的!
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-KOS8L  2023-9-25 08:36:22 来自APP
请问楼主有收到下一步面试的邀请吗
回复

使用道具 举报

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

本版积分规则

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