[BOJ] 11280 2-SAT - 3Read more
[Hacker Earth] Amazon SDE Challenge - April/ May 2022 - Cricket Training Program

Amazon SDE Challenge - April/ May 2022

Cricket Training Program

Read more
[Hacker Earth] Amazon SDE Challenge - April/ May 2022 - Minimize Difference

Amazon SDE Challenge - April/ May 2022

Read more
[BOJ] 6264 Sub-dictionaryRead more
[BOJ] 4196 도미노Read more
[BOJ] 6543 그래프의 싱크Read more
[BOJ] 2150 Strongly Connected ComponentRead more
[LeetCode] Maximum Fruits Harvested After at Most K Steps

2106. Maximum Fruits Harvested After at Most K Steps

Fruits are available at some positions on an infinite x-axis. You are given a 2D integer array fruits where fruits[i] = [positioni, amounti] depicts amounti fruits at the position positioni. fruits is already sorted by positioni in ascending order, and each positioni is unique.

You are also given an integer startPos and an integer k. Initially, you are at the position startPos. From any position, you can either walk to the left or right. It takes one step to move one unit on the x-axis, and you can walk at most k steps in total. For every position you reach, you harvest all the fruits at that position, and the fruits will disappear from that position.

Return the maximum total number of fruits you can harvest.

Read more
[BOJ] 18251 내 생각에 A번인 단순 dfs 문제가 이 대회에서 E번이 되어버린 건에 관하여 (Easy)Read more
[BOJ] 9248 Suffix ArrayRead more