Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[Concept Entry] C++ List #5337

wants to merge 1 commit into from

Conversation

SaviDahegaonkar
Copy link
Collaborator

@SaviDahegaonkar SaviDahegaonkar commented Sep 26, 2024

Description

A new entry on C++ lists

Issue Solved

#5314

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

@SaviDahegaonkar SaviDahegaonkar added c++ C++ entries new entry New entry or entries labels Sep 26, 2024
@cigar-galaxy82 cigar-galaxy82 self-assigned this Sep 26, 2024
@cigar-galaxy82 cigar-galaxy82 added the status: under review Issue or PR is currently being reviewed label Sep 29, 2024
Comment on lines +90 to +93




Copy link
Collaborator

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Collaborator

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

Comment on lines +23 to +25
```pseudo
#include <list>
```
Copy link
Collaborator

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;
}

Copy link
Collaborator

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this blank line

Comment on lines +30 to +31
#include <list>
int main() {
Copy link
Collaborator

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

Comment on lines +57 to +58
```
The output for the above code is:
Copy link
Collaborator

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'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Title: 'List'
Title: 'List'

@cigar-galaxy82
Copy link
Collaborator

Hi @SaviDahegaonkar thank you for contributing to Codecademy docs, I have suggested a few changes please modify them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants