345. How many children does a binary tree have?

0 or 1 or 2

346. What is/are the disadvantages of implementing tree using normal arrays?

Have to know the maximum number of nodes possible before creation of trees

347. Advantages of linked list representation of binary trees over arrays?

Both dynamic size and ease in insertion/deletion

348. Disadvantages of linked list representation of binary trees over arrays?

Random access is not possible and extra memory with every element

349. Which of the following traversing algorithm is not used to traverse in a tree?

Randomized

350. Level order traversal of a tree is formed with the help of

Breadth first search

351. Identify the reason which doesn’t play a key role to use threaded binary trees?

They occupy less size

352. A binary tree is a rooted tree but not an ordered tree.

False

353. How many common operations are performed in a binary tree?

3

354. What is the traversal strategy used in the binary tree?

Breadth-first traversal

355. How many types of insertion are performed in a binary tree?

2

356. General ordered tree can be encoded into binary trees.

True

357. How many orders of traversal are applicable to a binary tree (in general)?

3

358. In postorder traversal of binary tree right subtree is traversed before visiting root.

True

359. What is the possible number of binary trees that can be created with 3 nodes, giving the sequence n, m, l when traversed in post-order.

5

360. The post-order traversal of a binary tree is o p q r s t. Then possible pre-order traversal will be ________

T q o p s r

361. Which of the following pair’s traversals on a binary tree can build the tree uniquely?

Post-order and in-order

362. A full binary tree can be generated using ______

Post-order and pre-order traversal

363. The maximum number of nodes in a tree for which post-order and pre-order traversals may be equal is ______

1

364. The steps for finding post-order traversal are traverse the right subtree, traverse the left subtree or visit the current node.

False

365. For a binary tree the first node visited in in-order and post-order traversal is same.

False

366. The number of edges from the root to the node is called __________ of the tree.

Depth

367. The number of edges from the node to the deepest leaf is called _________ of the tree.

Height

368. What is a full binary tree?

Each node has exactly zero or two children

369. What is a complete binary tree?

A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right

370. Which of the following is not an advantage of trees?

Undo/redo operations in a notepad

371. Which of the following is false about a binary search tree?

In order sequence gives decreasing order of elements

372. What is the speciality about the inorder traversal of a binary search tree?

It traverses in an increasing order

373. What are the conditions for an optimal binary search tree and what is its advantage?

The tree should not be modified and you should know how often the keys are accessed, it improves the lookup cost

374. What will be the height of a balanced full binary tree with 8 leaves?

4

375. The balance factor of a node in a binary tree is defined as _____

Height of left subtree minus height of right subtree

376. A binary tree is balanced if the difference between left and right subtree of every node is not more than ____

1

377. Which of the following tree data structures is not a balanced binary tree?

B-tree

378. Which of the following data structures can be efficiently implemented using height balanced binary search tree?

Both sets and priority queue

379. Which of the following is an advantage of balanced binary search tree, like avl tree, compared to binary heap?

Insertion takes less time

380. Avl trees are more balanced than red-black trees.

True

381. What is a cartesian tree?

A tree which obeys heap property and whose inorder traversal yields the given sequence

382. What is the speciality of cartesian sorting?

It sorts partially sorted set of data quickly

383. Consider a sequence of numbers to have repetitions, how a cartesian tree can be constructed in such situations without violating any rules?

Use any tie-breaking rule between repeated elements

384. Cartesian trees are most suitable for?

Minimum range query and lowest common ancestors

385. A treap is a cartesian tree with ___________

Additional value, which is a priority value to the key generated randomly

386. Which of the following is the most widely used external memory data structure?

B-tree

387. A b-tree of order 4 and of height 3 will have a maximum of _______ keys.

255

388. Five node splitting operations occurred when an entry is inserted into a b-tree. Then how many nodes are written?

11

389. B-tree and avl tree have the same worst case time complexity for insertion and deletion.

True

390. Compression techniques can be used on the keys to reduce both space and time requirements in a b-tree.

True

391. Which of the following is true?

Larger the order of b-tree, less frequently the split occurs

392. In a b+ tree, both the internal nodes and the leaves have keys.

False

393. Which of the following is true?

B + tree allows rapid random access as well as rapid sequential access

394. A b+ tree can contain a maximum of 7 pointers in a node. What is the minimum number of keys in leaves?

3

395. Which of the following is false?

A b+ -tree grows downwards

396. Cartesian trees solve range minimum query problem in constant time.

True

397. What is the maximum number of keys that a b+ -tree of order 3 and of height 3 have?

26

398. Which of the following is false?

B+ -tree has greater depth than corresponding b-tree

399. Which one of the following data structures are preferred in database-system implementation?

B+ -tree

400. How many child nodes does each node of ternary tree contain?

3

401. Which of the following is the name of the node having child nodes?

Parent

402. What is the depth of the root node of the ternary tree?

0

403. What is the height of the root node of ternary tree?

0

404. How many extra nodes are there in full ternary tree than a complete ternary tree?

Both have same number of nodes

405. Can leaf node be called child node in a ternary tree?

True

406. Can child node be always called leaf node in the ternary tree?

False

407. Which of the following is the implementation of the ternary tree?

Ternary heap

408. In a simple graph, the number of edges is equal to twice the sum of the degrees of the vertices.

False

409. A connected planar graph having 6 vertices, 7 edges contains _____________ regions.

3

410. Which of the following properties does a simple graph not hold?

Must be connected

411. What is the maximum number of edges in a bipartite graph having 10 vertices?

25

412. Dijkstra’s algorithm will work for both negative and positive weights?

False

413. A graph having an edge from each vertex to every other vertex is called a __

Tightly connected

414. What is the number of unlabeled simple directed graph that can be made with 1 or 2 vertices?

4

415. All graphs have unique representation on paper.

False

416. Assuming value of every weight to be greater than 10, in which of the following cases the shortest path of a directed weighted graph from 2 vertices u and v will never change?

Multiply all values by 10

417. What is the maximum possible number of edges in a directed graph with no self loops having 8 vertices?

56

418. What is the maximum number of edges present in a simple directed graph with 7 vertices if there exists no cycles in the graph?

6

419. Given a plane graph, g having 2 connected component, having 6 vertices, 7 edges and 4 regions. What will be the number of connected components?

2

420. Number of vertices with odd degrees in a graph having a eulerian walk is ________

Either 0 or 2

421. All paths and cyclic graphs are bipartite graphs.

False

422. What is the number of vertices of degree 2 in a path graph having n vertices,here n>2.

N-2

423. All trees with n vertices consists of n-1 edges.

True

424. Which of the following is not a keyword?

(eval

425. Which one of the following has the highest precedence in the expression?

(parentheses

426. What is the return value of trunc()?

(int

427. What is the type of inf?

(float

428. Any odd number on being and-ed with ________ always gives hint: any even number on being and-ed with this value always gives 0.

(1