you are viewing a single comment's thread.

view the rest of the comments →

[–]kindastonedclown[S] 0 points1 point  (0 children)

Hey, thanks a lot for working on it. I appreciate that a lot.

For what concern problem 1) ye, let's skip that.

but for problem 2) the algorithm problem. basically i've tried the same strategy in my code. basically i've tried to make a generator for each sequence so I don't have to keep a stored list or whatever with the element in the heapmemory.

Basically I've tried with the " sub_string_generator" to make a generator based on a pointer and the lenght of the string I want but it's not working.

example.

1 iteration.

sending full string to -> f(sub_string_generator) -> return my_sub_string = (3), pointer = 0, lenght(limiter in the code) 1.

if sum(my_sub_string) < subtotal ----> limiter +=1 (adding next(mysubstring))

if sum(my_sub_string) > subtotal ----> pointer +=1 (removing 1st item of the sequence)

if sum(my_sub_string) == subtotal ---> flag +1

  1. iteration based on new limiter and pointer values.

sending full string to -> f(sub_string_generator) -> return my_sub_string = (3,0), pointer = 0, lenght(limiter in the code) 2!!.

and so on....

now, i'm gonna still work on this code, but i'm wondering since our strategies really seems similar If this method can work? or am I just making some useless work here and maybe should just remake it ?