-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-669: Implement StringList pop_back()
-Implemented a new "void pop_back()" method. -Removes the last string from StringList. -Returns false if deallocation fails -Panics if StringList is empty. -'back_' and 'front_' point to NULL when last string is poped. Test cases covered: -Size should be zero after removing last element from the list. -Different size strings have been used to make sure it works as expected. -'front_' and 'back_' have to point to same string when initial list with two strings is poped. -'back_' should point to 'n-1' string after poping initial 'n' number of strings.
- Loading branch information
1 parent
1ad2399
commit d23c0ab
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters