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

[其他] salesforce oa

🔗
Boman | 只看该作者 |倒序浏览
全局:

2025(10-12月)-CS硕士+3个月-1年 | 网上海投|BayArea湾区 码农类General全职@salesforce

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

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

x
Question 1:

You are given a singly linked list of integers. Your task is to modify the list so that: You keep only the first occurrence of each value. You remove any node whose value has already appeared earlier in the list. You then return the head of the updated linked list. . 1point 3 acres

Note: A LinkedListNode has two attributes: data, an integer, and next, a reference to the next item in the list or the language equivalent of null at the tail.

Example 1: In the following list, the value 3 appears as a duplicate initially: [3] -> [4] -> [3] -> [6]. Redundant nodes are labeled 3. After calling condense, the redundant node is removed: [3] -> [4] -> [6]. Example 2: List values in order are 3, 4, 3, 2, 6, 1, 2, 6.

Question 2: . 1point3acres

Determine the maximum length of a subsequence from one string that is also a substring of another string. A subsequence of a string is created by removing zero or more characters from it, while a substring consists of consecutive characters from the string. Given two strings x and y, determine the length of the longest subsequence of x that is also a substring of y. ..

Example: x = abcd, y = abdc. The subsequences of abcd are a, b, c, d, ab, ac, ad, bc, bd, cd, abc, abd, acd, bcd, and abcd. The substrings of abdc are a, b, d, c, ab, bd, dc, abd, bdc, and abdc. The longest subsequence of x that is also a substring of y is abd with length 3. Function

Sample Input 0: x = hackerranks, y = hackers. Sample Output 0: 7. Explanation: hackers is the longest subsequence of x that is also a substring of y.


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

本版积分规则

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