From 4552bcf5a4a356415e248dee3b201f0cea7205bb Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Wed, 27 Aug 2025 12:45:33 -0600 Subject: chore: Refactor two_d_arr_init function Return a pointer to a new struct, rather than initialise objects in an existing struct --- leetcode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'leetcode.h') diff --git a/leetcode.h b/leetcode.h index cc17fc2..fd17b7c 100644 --- a/leetcode.h +++ b/leetcode.h @@ -35,8 +35,8 @@ struct Node { struct Node **children; }; -void two_d_arr_init(struct two_d_arr *obj, int row_size, int col_size, - int arr[row_size][col_size]); +struct two_d_arr *two_d_arr_init(int row_size, int col_size, + int arr[row_size][col_size]); void two_d_arr_free(struct two_d_arr *obj); struct ListNode *listnode_create(int val); -- cgit v1.2.3