# Tag Archives: Data Structures

Which data structure is used for balancing of symbols? (A) Stack (B) Queue (C) Tree (D) Graph Answer: (A) Explanation: Stack is used for balancing… Read More
Which of the following cannot generate the full binary tree? (A) Inorder and Preorder (B) Inorder and Postorder (C) Preorder and Postorder (D) None of… Read More
A program P reads in 500 integers in the range [0..100] representing the scores of 500 students. It then prints the frequency of each score… Read More
A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below: 10, 8, 5, 3,… Read More
The time complexity of computing the transitive closure of a binary relation on a set of n elements is known to be: (A) O(n) (B)… Read More
Which of the following tree traversal uses a queue data structure? (A) Preorder (B) Inorder (C) Postorder (D) Level order Answer: (D) Explanation: Level order… Read More
Which traversal of tree resembles the breadth first search of the graph? (A) Preorder (B) Inorder (C) Postorder (D) Level order Answer: (D) Explanation: Breadth… Read More
Which of the following traversal outputs the data in sorted order in a BST? (A) Preorder (B) Inorder (C) Postorder (D) Level order Answer: (B)Explanation:… Read More
Following is an incorrect pseudocode for the algorithm which is supposed to determine whether a sequence of parentheses is balanced:  C declare a character stack… Read More
Consider the following pseudocode that uses a stack  C declare a stack of characters while ( there are more characters in the word to read… Read More
How many distinct binary search trees can be created out of 4 distinct keys? (A) 4 (B) 14 (C) 24 (D) 42 Answer: (B) Explanation:… Read More
How many different insertion sequences of the key values using the hash function h(k) = k mod 10 and linear probing will result in the… Read More
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty… Read More
The following C function takes a simply-linked list as input argument. It modifies the list by moving the last element to the front of the… Read More
The degree sequence of a simple graph is the sequence of the degrees of the nodes in the graph in decreasing order. Which of the… Read More
{"ft_lang_label":"__label__en","ft_lang_prob":0.80979437,"math_prob":0.7397156,"size":2351,"snap":"2023-14-2023-23","text_gpt3_token_len":585,"char_repetition_ratio":0.15594375,"word_repetition_ratio":0.06419753,"special_character_ratio":0.24032326,"punctuation_ratio":0.07538803,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9646672,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-05T14:00:44Z\",\"WARC-Record-ID\":\"<urn:uuid:541af701-3240-40aa-8bd9-85e01b917422>\",\"Content-Length\":\"213580\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5233b81e-ab8d-4ecf-8b10-fbe9a23f121c>\",\"WARC-Concurrent-To\":\"<urn:uuid:5816d31d-f26f-4d1f-9472-08a4741b2174>\",\"WARC-IP-Address\":\"44.228.100.190\",\"WARC-Target-URI\":\"https://origin.geeksforgeeks.org/tag/data-structures/page/11/\",\"WARC-Payload-Digest\":\"sha1:AT26VYZYNTT2AEQFEIQKFNUQQVIGDWAW\",\"WARC-Block-Digest\":\"sha1:ZNWJTYYJHLQLY56DUOJ2BVAFKLSOU2KK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224652116.60_warc_CC-MAIN-20230605121635-20230605151635-00204.warc.gz\"}"}