-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Concept Entry] C++ List #5337
base: main
Are you sure you want to change the base?
[Concept Entry] C++ List #5337
Conversation
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these blank lines
- 'paths/computer-science' | ||
--- | ||
|
||
The **List** in C++ is a part of the Standard Template Library (STL) and represents a doubly linked list. It allows proficient insertion and deletion of elelments at any position with constant time complexity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The **List** in C++ is a part of the Standard Template Library (STL) and represents a doubly linked list. It allows proficient insertion and deletion of elelments at any position with constant time complexity. | |
**List** in C++ is a sequential container and a part of the Standard Template Library (STL) that stores elements in non-contiguous memory locations. The list is implemented using a doubly linked list. It allows proficient insertion and deletion of elements at any known position with constant time complexity. |
|
||
## Syntax | ||
|
||
To implement std::list in C++, you need to include the following header: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention this part as a note
```pseudo | ||
#include <list> | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this part mention pseudo code for list
std::cout << std::endl; | ||
return 0; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line
```shell | ||
List elements: 5 10 20 | ||
Updated list elements after deletion: 5 20 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this blank line
#include <list> | ||
int main() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give a blank line after line 30
``` | ||
The output for the above code is: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give a blank line after line 50
@@ -0,0 +1,93 @@ | |||
--- | |||
Title: 'List' | |||
Description: 'In C++, list is a doubly linked list from the STL. It allows efficient insertions and deletions of data' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description: 'In C++, list is a doubly linked list from the STL. It allows efficient insertions and deletions of data' | |
Description: 'List is a sequential container that stores elements non-contiguous memory locations.' |
@@ -0,0 +1,93 @@ | |||
--- | |||
Title: 'List' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Title: 'List' | |
Title: 'List' |
Hi @SaviDahegaonkar thank you for contributing to Codecademy docs, I have suggested a few changes please modify them. |
Description
A new entry on C++ lists
Issue Solved
#5314
Type of Change
Checklist
main
branch.Issues Solved
section.