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

Автор abdalimran, 10 лет назад, По-английски

You are given S,X and N.

S = size of an array

N = number of elements you have to find

X = sum

You have to find N elements from the array which sum is X.

Input:

7 25 3

1 5 10 7 13 15

Output:

5 7 13

If there are multiple solution you can output any of them. What are the best possible solutions with least complexity for this problem?

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

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

Автор abdalimran, 10 лет назад, По-английски

Hello, I am trying to learn recursion & DP techniques. As I am very beginner in these concepts, please help me by giving some links/tutorials/videos or any resources from which I can learn these concepts from scratch to advanced level.

Thanks in advance.

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

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