Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

Автор Tkm_algo, история, 23 месяца назад, По-английски

Hi, I can't solve this problem for 3 days now. Please help me solve this problem: Two arrays of the same length (n) are given. Need to find any segment so that the sum of the elements of the first array on this segment is equal to the sum of the elements of the second array on this segment. Need to solve in O(n).

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

»
23 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Not completely sure if this will work:-

Spoiler
»
23 месяца назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится
Hint1
Hint2
Explanation
Code