From fafde107298d38399ad43d92c4a6316d6d9edbaa Mon Sep 17 00:00:00 2001 From: kvvCoutureAI Date: Tue, 1 Oct 2024 16:20:40 -0400 Subject: [PATCH] add doctest --- hashes/array_pairs_divisibility.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hashes/array_pairs_divisibility.py b/hashes/array_pairs_divisibility.py index 17a301fbc..09b528e51 100644 --- a/hashes/array_pairs_divisibility.py +++ b/hashes/array_pairs_divisibility.py @@ -48,6 +48,12 @@ n is even. class Solution: def can_arrange(self, arr: list[int], k: int) -> bool: + """ + Function to check if array pairs are divisible by k + :param arr: List of integers + :param k: Integer + :return: Boolean + """ sol_arr = [0 for i in range(k)] for i in arr: sol_arr[i % k] += 1