given array A and number s, find i,j so sum of A[i..j] = s(adsbygoogle = window.adsbygoogle || []).push({});

Can this be done in linear time? I've thought of using a hashtable

but I would be interested in other methods.

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Finding sequence that maps to a given sum

Loading...

Similar Threads - Finding sequence maps | Date |
---|---|

Can't find my Localhost Database Engine for SQL Server | Feb 16, 2018 |

C/++/# Finding duplicates algorithm | Jan 20, 2018 |

C/++/# Is there an easy way to find ints i,j,k satisfying i*j=k^2? | May 19, 2017 |

C/++/# Program to find combination of letters associated with phone | Mar 1, 2017 |

Fibonacci sequence problem C# | Aug 2, 2015 |

**Physics Forums - The Fusion of Science and Community**