Блог пользователя Adiix

Автор Adiix, история, 4 недели назад, По-английски

I've been trying to solve this problem:

https://leetcode.com/problems/maximum-subarray-sum-with-one-deletion/description/

Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one element deletion. In other words, you want to choose a subarray and optionally delete one element from it so that there is still at least one element left and the sum of the remaining elements is maximum possible.

Note that the subarray needs to be non-empty after deleting one element."

but I'm unable to think how to approach this problem.. :| any help anyone please?! I tried understanding from LLMs videos but failed to..

Полный текст и комментарии »

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

Автор Adiix, история, 4 года назад, По-английски

Not able to do bit manipulation questions, help anyone? :c

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор Adiix, история, 4 года назад, По-английски

I've been trying DP questions ( not enough in codeforces, but in leetcode ) and whenever I try to solve this question, I'm stuck at whether I should do it with 1d Array or 2d Array.

now now now, I know many of you are going to say solve more problems ( I agree ). Through this question, I just want to know perspective of someone who has done dozens of questions..

Thanks and Peace out :)

Полный текст и комментарии »

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится