leetcode.cn 2025-12-16
🔴3562.maximum-profit-from-trading-stocks-with-discounts
🏷️ Tags
#tree #depth_first_search #array #dynamic_programming
🔴3562.maximum-profit-from-trading-stocks-with-discounts
🏷️ Tags
#tree #depth_first_search #array #dynamic_programming
Telegraph
maximum-profit-from-trading-stocks-with-discounts
给你一个整数 n,表示公司中员工的数量。每位员工都分配了一个从 1 到 n 的唯一 ID ,其中员工 1 是 CEO。另给你两个下标从 1 开始的整数数组 present 和 future,两个数组的长度均为 n,具体定义如下:
leetcode.com 2025-12-16
🔴3562.maximum-profit-from-trading-stocks-with-discounts
🏷️ Tags
#tree #depth_first_search #array #dynamic_programming
🔴3562.maximum-profit-from-trading-stocks-with-discounts
🏷️ Tags
#tree #depth_first_search #array #dynamic_programming
Telegraph
maximum-profit-from-trading-stocks-with-discounts
You are given an integer n, representing the number of employees in a company. Each employee is assigned a unique ID from 1 to n, and employee 1 is the CEO. You are given two 1-based integer arrays, present and future, each of length n, where:
leetcode.cn 2025-12-19
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
🔴2092.find-all-people-with-secret
🏷️ Tags
#depth_first_search #breadth_first_search #union_find #graph #sorting
Telegraph
find-all-people-with-secret
给你一个整数 n ,表示有 n 个专家从 0 到 n - 1 编号。另外给你一个下标从 0 开始的二维整数数组 meetings ,其中 meetings[i] = [xi, yi, timei] 表示专家 xi 和专家 yi 在时间 timei 要开一场会。一个专家可以同时参加 多场会议 。最后,给你一个整数 firstPerson 。 专家 0 有一个 秘密 ,最初,他在时间 0 将这个秘密分享给了专家 firstPerson 。接着,这个秘密会在每次有知晓这个秘密的专家参加会议时进行传播。更正式的表达是,每次会议,如果专家…