{"id":125952,"date":"2023-11-24T04:46:55","date_gmt":"2023-11-24T04:46:55","guid":{"rendered":"https:\/\/learnexams.com\/blog\/?p=125952"},"modified":"2023-11-24T04:46:57","modified_gmt":"2023-11-24T04:46:57","slug":"wgu-c949-data-structures-and-algorithms-i-objective-assessment-exam-2","status":"publish","type":"post","link":"https:\/\/www.learnexams.com\/blog\/2023\/11\/24\/wgu-c949-data-structures-and-algorithms-i-objective-assessment-exam-2\/","title":{"rendered":"WGU C949 DATA STRUCTURES AND ALGORITHMS IOBJECTIVE ASSESSMENT EXAM"},"content":{"rendered":"\n<p>What is a characteristic of keys in an associative dictionary data type? &#8211;<br>ANSWER- They are unique and immutable.<br>Which method can be used to take a value out of a dictionary? &#8211;<br>ANSWER- D1[key].remove(value)<br>Given this data dictionary in Python:<br>dict = {&#8216;white&#8217;:0x0000, &#8216;black&#8217;:0x1111}<br>Which command\/function generates the output [&#8216;white&#8217;,&#8217;black&#8217;]? &#8211;<br>ANSWER- dict.keys()<br>Items were added sequentially in this stack starting with &#8216;ham&#8217;:<br>&#8216;sausage&#8217;<br>&#8216;toast&#8217;<br>&#8216;eggs&#8217;<br>&#8216;ham&#8217;<br>What is the correct order of contents after the push operation is<br>performed with the value &#8216;bacon&#8217;? &#8211; ANSWER- &#8216;bacon&#8217;<br>&#8216;sausage&#8217;<br>&#8216;toast&#8217;<br>&#8216;eggs&#8217;<br>&#8216;ham&#8217;<br>Items were added sequentially in this stack starting with &#8220;dog&#8221;:<br><br>&#8220;bird&#8221;<br>&#8220;rabbit&#8221;<br>&#8220;cat&#8221;<br>&#8220;dog&#8221;<br>What is the return value of the pop operation? &#8211; ANSWER- &#8220;bird&#8221;<br>Which sequence of letters represents preorder traversal of the nodes of<br>this tree?<br>A<br>\/ \\<br>B C<br>\/ \\<br>\/ \\<br>D E<br>\\ \/ \\<br>F G H<br>\/<br>I &#8211; ANSWER- A B C D F E G I H<br>An array soc of size 1009 is used where the index is an integer in<br>[0,1008] and the hash-function key%1009.<br>Where will the data associated with the key given by the last 4 social<br>security digits &#8216;2023&#8217; be stored? &#8211; ANSWER- In soc[5]<br>A stack s, a queue q, and a max value priority queue p each have a single<br>3 in them. Next s.push(4), q.push(4), and p.push(4) are executed.<br>What is the triple (s.pop(), q.pop(), p.pop())? &#8211; ANSWER- (4,3,4)<br>This stack reads left to right with the top to the right:<br>&#8216;green&#8217;<br>&#8216;yellow&#8217;<br>&#8216;blue&#8217;<br><br>&#8216;red&#8217;<br>What could be the stack after a push operation? &#8211; ANSWER-<br>[&#8216;red&#8217;,&#8217;blue&#8217;,&#8217;yellow&#8217;, &#8216;green&#8217;, &#8216;purple&#8221;]<br>Items were added sequentially onto the stack starting with &#8216;red&#8217;:<br>&#8216;green&#8217;<br>&#8216;yellow&#8217;<br>&#8216;blue&#8217;<br>&#8216;red&#8217;<br>What is the stack after a pop operation? &#8211; ANSWER- &#8216;yellow&#8217;<br>&#8216;blue&#8217;<br>&#8216;red&#8217;<br>Which command helps to speed up comparisons using dictionary keys<br>during a dictionary (d) lookup in this pseudocode clip?<br>h = hash(key)<br>for pair in d:<br>if h == pair[0]:<br>return pair[1] &#8211; ANSWER- hash(object)<br>What does the method any(b) return in Python if b is a dictionary? &#8211;<br>ANSWER- Returns True if any key of the dictionary is true.<br>Which Java method is used to read bytes from a standard file? &#8211;<br>ANSWER- Java.io.FileInputStream<br>Which command will retrieve an item from the top of the stack? &#8211;<br>ANSWER- Pop()<br>Which command will insert object x at position index in a list? &#8211;<br>ANSWER- Add(int index, Object x)<br><br>Which command will return true if x is in a list, otherwise return false? &#8211;<br>ANSWER- Contains(Object x)<br>When should a dictionary be used instead of a list? &#8211; ANSWER- When<br>the program uses key-value pairs as its data<br>The reference of the head of the doubly linked list is passed to the<br>reverse() method:<br>1&lt;&#8211;>2&lt;&#8211;>3&lt;&#8211;>4&lt;&#8211;>5&lt;&#8211;>6<br>What is the modified linked list when complete? &#8211; ANSWER- 6&lt;&#8211;>5&lt;&#8211;<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>4&lt;&#8211;&gt;3&lt;&#8211;&gt;2&lt;&#8211;&gt;1<br>Which data structure is indexed? &#8211; ANSWER- Array<br>Which data structure may only store homogeneous data elements? &#8211;<br>ANSWER- Arrays<br>What is a hierarchical data structure? &#8211; ANSWER- Tree<br>What is an attribute of a binary tree? &#8211; ANSWER- Each node has at most<br>two children.<br>Which data structure uses a last in, first out (LIFO) removal of items? &#8211;<br>ANSWER- Stack<br>Given:<br>heapList = [22, 33, 44, 55, 66]<br>Which index is the right child of item 22? &#8211; ANSWER- 44<\/p>\n<\/blockquote>\n\n\n\n<p>Download full exam pdf here <a href=\"https:\/\/learnexams.com\/search\/study?query=\" target=\"_blank\" rel=\"noopener\">https:\/\/learnexams.com\/search\/study?query=<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is a characteristic of keys in an associative dictionary data type? &#8211;ANSWER- They are unique and immutable.Which method can be used to take a value out of a dictionary? &#8211;ANSWER- D1[key].remove(value)Given this data dictionary in Python:dict = {&#8216;white&#8217;:0x0000, &#8216;black&#8217;:0x1111}Which command\/function generates the output [&#8216;white&#8217;,&#8217;black&#8217;]? &#8211;ANSWER- dict.keys()Items were added sequentially in this stack starting with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25],"tags":[],"class_list":["post-125952","post","type-post","status-publish","format-standard","hentry","category-exams-certification"],"_links":{"self":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/posts\/125952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/comments?post=125952"}],"version-history":[{"count":0,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/posts\/125952\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/media?parent=125952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/categories?post=125952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/tags?post=125952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}