Skip to content

Commit

Permalink
Merge pull request #676 from tpenn/csharp-queues-stacks
Browse files Browse the repository at this point in the history
Added queues and stacks to C#
  • Loading branch information
geekygirlsarah authored Oct 2, 2023
2 parents 1e04dcd + 9c0fc12 commit 48e790c
Showing 1 changed file with 280 additions and 0 deletions.
280 changes: 280 additions & 0 deletions web/thesauruses/csharp/9/queues_stacks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,280 @@
{
"meta": {
"language": "csharp",
"language_version": "9.0",
"language_name": "C#",
"structure": "queues_stacks"
},
"concepts": {
"simple_queue_import_statement": {
"name": "Import statement to add simple queue",
"code": "using System.Collections.Generic;"
},
"simple_queue_data_type": {
"name": "Queue data type name",
"code": "Queue<T>"
},
"simple_queue_create_statement": {
"name": "Create a queue",
"code": "Queue<dataType> newQueue = new Queue<dataType>();"
},
"simple_queue_create_copy_statement": {
"name": "Create a queue from existing queue",
"code": "Queue<dataType> newQueue = new Queue<dataType>(existingQueue);"
},
"simple_queue_create_copy_from_list_statement": {
"name": "Create a queue from a list of items",
"code": "Queue<dataType> newQueue = new Queue<dataType>(list);"
},
"simple_queue_destroy_statement": {
"not-implemented": true,
"name": "Destroy/delete a queue"
},
"simple_queue_data_structure": {
"name": "Data structure that backs the simple queue",
"code": [
"inherits Object",
"implements IEnumerable<T> IReadOnlyCollection<T> ICollection IEnumerable"
]
},
"circular_queue_import_statement": {
"not-implemented": true,
"name": "Import statement to add circular queue"
},
"circular_queue_data_type": {
"not-implemented": true,
"name": "Queue data type name"
},
"circular_queue_create_statement": {
"not-implemented": true,
"name": "Create a queue"
},
"circular_queue_create_copy_statement": {
"not-implemented": true,
"name": "Create a queue from existing queue"
},
"circular_queue_create_copy_from_list_statement": {
"not-implemented": true,
"name": "Create a queue from a list of items"
},
"circular_queue_destroy_statement": {
"not-implemented": true,
"name": "Destroy/delete a queue"
},
"circular_queue_data_structure": {
"not-implemented": true,
"name": "Data structure that backs the simple queue"
},
"priority_queue_import_statement": {
"not-implemented": true,
"name": "Import statement to add priority queue"
},
"priority_queue_data_type": {
"not-implemented": true,
"name": "Queue data type name"
},
"priority_queue_create_statement": {
"not-implemented": true,
"name": "Create a queue"
},
"priority_queue_create_copy_statement": {
"not-implemented": true,
"name": "Create a queue from existing queue"
},
"priority_queue_create_copy_from_list_statement": {
"not-implemented": true,
"name": "Create a queue from a list of items"
},
"priority_queue_destroy_statement": {
"not-implemented": true,
"name": "Destroy/delete a queue"
},
"priority_queue_data_structure": {
"not-implemented": true,
"name": "Data structure that backs the simple queue"
},
"double_ended_queue_import_statement": {
"not-implemented": true,
"name": "Import statement to add double-ended queue"
},
"double_ended_queue_data_type": {
"not-implemented": true,
"name": "Queue data type name"
},
"double_ended_queue_create_statement": {
"not-implemented": true,
"name": "Create a queue"
},
"double_ended_queue_create_copy_statement": {
"not-implemented": true,
"name": "Create a queue from existing queue"
},
"double_ended_queue_create_copy_from_list_statement": {
"not-implemented": true,
"name": "Create a queue from a list"
},
"double_ended_queue_destroy_statement": {
"not-implemented": true,
"name": "Destroy/delete a queue"
},
"double_ended_queue_data_structure": {
"not-implemented": true,
"name": "Data structure that backs the simple queue"
},
"stack_import_statement": {
"name": "Import statement to add stacks",
"code": "using System.Collections.Generic;"
},
"stack_data_type": {
"name": "Stack data type name",
"code": "Stack<T>"
},
"stack_create_statement": {
"name": "Create a stack",
"code": "Stack<dataType> newStack = new Stack<dataType>();"
},
"stack_create_copy_statement": {
"name": "Create a stack from existing stack",
"code": "Stack<dataType> newStack = new Stack<dataType>(existingStack.Reverse());"
},
"stack_create_copy_from_list_statement": {
"name": "Create a stack from a list",
"code": "Stack<dataType> newStack = new Stack<dataType>(list);"
},
"stack_destroy_statement": {
"not-implemented": true,
"name": "Destroy/delete a stack"
},
"stack_data_structure": {
"name": "Data structure that backs the simple stack",
"code": [
"inherits Object",
"implements IEnumerable<T> IReadOnlyCollection<T> ICollection IEnumerable"
]
},
"queue_enqueue_an_item": {
"name": "Enqueue an item (add to end)",
"code": "aQueue.Enqueue(item);"
},
"queue_enqueue_priority_item": {
"not-implemented": true,
"name": "Enqueue a high priority item (add to end of priority queue)"
},
"queue_enqueue_from_list": {
"not-implemented": true,
"name": "Enqueue items from a list into queue (add list to end)"
},
"queue_enqueue_priority_from_list": {
"not-implemented": true,
"name": "Enqueue priority items from a list (add list to end of priority queue)"
},
"queue_dequeue_return_an_item": {
"name": "Dequeue an item (remove from front, return item)",
"code": "item = aQueue.Dequeue();"
},
"queue_dequeue_delete_an_item": {
"not-implemented": true,
"name": "Dequeue an item (remove from front, don't return)"
},
"queue_peek_at_next_item": {
"name": "Look/peek at next available element (from front)",
"code": "nextElement = aQueue.Peek();"
},
"queue_peek_at_last_item": {
"not-implemented": true,
"name": "Look/peek at last element (from back)"
},
"queue_duplicate_next_item": {
"not-implemented": true,
"name": "Duplicate next item"
},
"queue_swap_two_items": {
"not-implemented": true,
"name": "Swap two items"
},
"queue_get_size": {
"name": "Get size (number of items) in the queue",
"code": "int size = aQueue.Count;"
},
"queue_get_capacity": {
"not-implemented": true,
"name": "Check capacity of queue"
},
"queue_export_to_list": {
"name": "Export a list of all queue items",
"code": "Object[] arr = aQueue.ToArray();"
},
"queue_clear_all": {
"name": "Clear out all queue items",
"code": "aQueue.Clear();"
},
"stack_push_item": {
"name": "Push an item (add to top)",
"code": "aStack.Push(item);"
},
"stack_pop_return_item": {
"name": "Pop an item (remove from top, return item)",
"code": "item = aStack.Pop();"
},
"stack_pop_delete_item": {
"not-implemented": true,
"name": "Pop an item (remove from top, don't return)"
},
"stack_peek_at_next_item": {
"name": "Look/peek at next element (from top)",
"code": "nextElement = aStack.Peek();"
},
"stack_peek_at_last_item": {
"not-implemented": true,
"name": "Look/peek at last element (from bottom)"
},
"stack_duplicate_next_item": {
"not-implemented": true,
"name": "Duplicate top item"
},
"stack_swap_two_items": {
"not-implemented": true,
"name": "Swap two items"
},
"stack_get_size": {
"name": "Get size (number of items) on the stack",
"code": "int size = aStack.Count"
},
"stack_get_capacity": {
"not-implemented": true,
"name": "Check capacity of stack"
},
"stack_export_to_list": {
"name": "Export a list of all stack items",
"code": "Object[] arr = aStack.ToArray();"
},
"stack_clear_all": {
"name": "Clear all queue items",
"code": "aStack.Clear();"
},
"iterate_pointer_data_type": {
"not-implemented": true,
"name": "Data type of a iterator pointer"
},
"iterate_create_pointer": {
"not-implemented": true,
"name": "Create iterator"
},
"iterate_move_to_next_item": {
"not-implemented": true,
"name": "Move pointer to next item"
},
"iterate_move_to_previous_item": {
"not-implemented": true,
"name": "Move pointer to previous item"
},
"iterate_move_to_beginning": {
"not-implemented": true,
"name": "Move pointer to beginning of queue/stack"
},
"iterate_move_to_end": {
"not-implemented": true,
"name": "Move pointer to end of queue/stack"
}
}
}

0 comments on commit 48e790c

Please sign in to comment.