cp-library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub kobejean/cp-library

:warning: cp_library/alg/iter/shift_fn.py

Code

import cp_library.alg.iter.__header__
from typing import Sequence
from cp_library.misc.typing import _T

def shift(A: Sequence[_T], offset=-1):
    return [a+offset for a in A]
'''
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
             https://kobejean.github.io/cp-library               
'''
from typing import Sequence
from typing import TypeVar
_T = TypeVar('T')

def shift(A: Sequence[_T], offset=-1):
    return [a+offset for a in A]
Back to top page