Why a vec with different string lengths

  • 0

    I'm new here. Does my resulting data structure have to exactly mirror the solution sample provided?
    ie [ ["aa", "b"], ["a", "a", "b"] ]

    one way to solve would be to have a substring size -> n and walk through finding which substrings of size n are palindromes, then incrementing n. this is possibly expensive and naive. this is my first try.

    But one of the vectors has two palindromes of different lenght.

    Any ideas?

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.