mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-02-04 05:44:35 +00:00
[PR #1265] [MERGED] changed list length to reflect contents of the list #1864
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/TheAlgorithms/C/pull/1265
Author: @aracnoid149
Created: 6/2/2023
Status: ✅ Merged
Merged: 6/20/2023
Merged by: @Panquesito7
Base:
master← Head:patch-1📝 Commits (3)
b2365eechanged list length to reflect contents of the list830f450Merge branch 'master' into patch-14df8a69Merge branch 'master' into patch-1📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
data_structures/list/list.c(+2 -2)📄 Description
I changed the return value of n in List_length to reflect the number of items inside the list, so a newly initialized list will return a length of 0. To prevent items in List_toArray from being cut off, I added one back to n at the beginning of the List_toArray function.
Description of Change
References
Checklist
Notes:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.