Quickies

[categories] [index] [all (527)] [latest]

Python
  1. Use this way, which takes a linear time:

    result = ''.join(strings)
    

    instead of this way, which takes a quadratic time:

    result = []
    for s in strings:
        result += s