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

Fixes issue#546 #664

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions web/thesauruses/cpp/C++17/queues_stacks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"meta": {
"language": "cpp",
"language_version": "C++17",
"language_name": "C++",
"structure": "queue and stacks"
Copy link
Member

Choose a reason for hiding this comment

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

This should be the name of the JSON file (so queues_stacks)

},
"concepts":{
"Inbuild_Header_file_for_queue":{
"code":"#include<queue>",
"name":"For implement queue container in our cpp file iclude this header file"
},
"Syntax_for_queue":{
"code":"queue<objectType> queue_name",
"name":"The general syntax for declaration of the queue"
},
"Push_operation_in_queue":{
"code":"queue_name.push(element)",
"name":" Function push adds the element at the end of the queue i.e. at the back of the queue"
},
"Pop_operation_in_queue":{
"code":"queue_name.pop(element)",
"name":"Function ‘pop’ removes the first element of the queue i.e. the element at the front of the queue"
},
"front_function_in_queue":{
"code":"queue_name.front()",
"name":"This function returns a reference to the first element of the queue"
},
"back_function_in_queue":{
"code":"queue_name.back()",
"name":"Back returns a reference to the last element in the queue"
},
"empty_function_in_queue":{
"code":"queue_name.empty()",
"name":"Checks if the queue is empty"
},
"size_function_in_queue":{
"code":"queue_name.size()",
"name":"Returns the size of the queue i.e. the number of elements in the queue"
},
"Inbuild_Header_file_for_stacks":{
"code":"#include<stack>",
"name":"In order to implement stack container, we need to include the header <stack> in our program"
},
"Syntax_for_stack":{
"code":"stack<objectType> stack_name",
"name":"The general syntax for declaration of the queue"
},
"Push_operation_in_stack":{
"code":"stack_name.push(element)",
"name":" push operation is used to insert an element in the stack. This operation always adds elements at the top of the stack"
},
"Pop_operation_in_stack":{
"code":"stack_name.pop(element)",
"comment":"As a result of the pop operation, the stack size is reduced by 1",
"name":"pop operation is used to remove an element from the stack. The element removed is the one that is pointed to by the top of the stack"
},
"top_function_in_stack":{
"code":"stack_name.top()",
"name":"Returns the topmost element of the stack"
},
"empty_function_in_stack":{
"code":"stack_name.empty()",
"name":" Returns the size of the stack i.e. the number of elements in the stack"
},
"size_function_in_stack":{
"code":"queue_name.size()",
"name":"Returns the size of the queue i.e. the number of elements in the queue"
}
}
Comment on lines +9 to +70
Copy link
Member

Choose a reason for hiding this comment

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

These are not valid concept names. (See previous comment.)

}