-
C program to print the information from each node in reverse order.
Write a C program to print the information from each node in reverse order in doubly linked list, in which pointer to last node is TAIL.
-
GetInstance()...
Please, can anybody answer me that when to use getInstance() and which class having getInstance(),I could not find that method in class Class also.
-
How to remove some keys in ArrayList
Hi.
This a class Employee containes eid and ename are datamembers. when these employee class objects are stored in arrary list
i want to remove eid containes 100 and 1000
plz replay to me -
-
What is the best case running time for insertion sort?
Select one:
O(n)
O(log n)
O(n²)
O(n log n) -
Express the formula (logn + 2)*(n - 1) using big-O notation:
Select one:
O(n)
O(n²)
O(nlog n)
None of the above
-
Letter sequence
The following letter sequence was generated by using a postorder traversal of a complete binary tree T. d e b f g c h What is the root of this tree?
Select one:
h
d
None of the above
f
-
Data Structure to Maintain Photographs Database
Your job is to build a data structure to maintain a set of photographs. Your photograph database should allow you to insert and search for photographs, as well as to designate some of the photographs as favourites by marking them. In more detail, your data structure should support the following operations:
Insert(x, t, m): inserts photograph x that was taken at time t. If m = 1, then the... -
Signed numbers do not have any impact on the memory .
Skill/Topic: Memory, Abstract Data Types, and AddressesA) TrueB) FalseExplanation: The sign takes up 1 bit of memory that could otherwise be used to represent a value. For example, a byte has 8 bits, all of which can be used to store an unsigned number from 0 to 255. You can store a signed number in the range of –128 to +127.
-
A pointer to a pointer is a variable whose value is an ________ of another _______ variable.
Skill/Topic: Variables and PointersA) Address, PointerExplanation: A pointer to a pointer is a variable whose value is an address of another pointer variable
-
Pointer to a pointer is used in a program to ?
Skill/Topic: Variables and PointersA) arrange data by moving data in memoryB) arrange data by moving pointer in memoryC) arrange data without having to move data in memory.D) None of the aboveExplanation: Pointer to a pointer is used in a program to arrange data without having to move data in memory.
-
An array is a way to reference a series of memory locations using the ______.
Skill/Topic: ArrayA) Same nameB) different nameC) Multiple namesD) Unique nameExplanation: An array is a way to reference a series of memory locations using the same name. Each memory location is represented by an array element. An array element is similar to one variable except it is identified by an index value instead of a name.
-
Why do we Use a Multidimensional Array?
Skill/Topic: ArrayA) A multidimensional array can be useful to organize subgroups of data within an array. In addition to organizing data stored in elements of an array, a multidimensional array can store memory addresses of data in a pointer array and an array of pointers
-
Allocating memory at runtime is also called as?
Skill/Topic: ArrayA) Statically allocating memoryB) Dynamically allocating memoryC) Sequentially allocating memoryD) All of the aboveExplanation: Allocating memory at runtime is called a dynamically allocating memory. In this,you dynamically allocate memory by using the new operator when declaring the array, for example:int grades[] = new int[10];
-
_________ method places a value onto the top of a stack.
Skill/Topic: Stacks using an ArrayA) push() member methodB) pop() member methodC) isFull() member methodD) isEmpty() member methodExplanation: Push is the direction that data is being added to the stack. push() member method places a value onto the top of a stack.
-
Popping removes an item from the stack.
Skill/Topic: Stacks using an ArrayA) TrueB) FalseExplanation: Popping is the reverse process of pushing: it removes an item from the stack. It is important to understand that popping an item off the stack doesn’t copy the item. Once an item is popped from the stack, the item is no longer available on the stack, although the value remains in the array
-
What is a queue ?
Skill/Topic: QueueA) A Queue is a sequential organization of data.
-
What is the relationship between a queue and its underlying array?
Skill/Topic: QueueA) Data stored in a queue is actually stored in an array. The queue tracks which array element is at the front of the queue and which array element is at the back of the queue.
-
The isFull() member method is called within the enqueue process to determine ?
Skill/Topic: QueueA) if there is room to place another item in the queue.B) if there is an item in the queue to be removedC) if there is an item in the queue to be locked
-
Each entry in a linked list is called a _______.
Skill/Topic: Linked ListA) LinkB) NodeC) Data structureExplanation: Each entry in a linked list is called a node. Think of a node as an entry that has three subentries. One subentry contains the data, which may be one attribute or many attributes. Another points to the previous node, and the last points to the next node. When you enter a new item on a linked list, you allocate the new node and then...
Data Structures Interview Questions
Ans