Hallo.If someone can say me are theese states are correct/incorect i will be very thankful.10x
A simple open addressing strategy for collision handling in hash tables is linear probing. Let us have a bucket array A = {35,14,D,21,E,12,E} with capacity N = 7, where E means "empty" and D means "deattached" (or "available") item. The hash function is h(k) = k mod 7. Find the correct/incorrect correspondence, where -> means "is equivalent to".
a. insertItem (38) -> A[3] = 38
b. InsertItem (10) -> “error”
c. insertItem (70) -> A[4] = 70
d. insertItem (18) -> A[4] = 18
Let us have a binary tree ADT in parenthetic string representation
T = a(b(c(d,e),f),g(h,i(j(k,l),m)). Is the given sequence a part of the sequence of nodes, obtained in Euler tour traversal of this binary tree?
a. gimj
b. cdce
c. mijk
d. bfba
Your 2nd question is not complete. It is missing a closing bracket. Assuming it is meant to be "T = a(b(c(d,e),f),g(h,i(j(k,l),m)))"
Euler tour traversal means parent, left child, parent, right child, parent
1 2 3 4 5 6 7 8 9 10
a
b1g
c2f1h2i
d3e12j3m
12k4l
a
b g
c f h i
d e j m
k l
A : g(parent)i(right child of parent)m(right child of right child of parent)j(left child of right child of parent) --> false
B : c(parent)d(left child)c(parent)e(right child) --> true
C : m(right child)i(parent)j(left child)k(left child of left child) --> false
D : b(left child)f(right child of left child)b(left child)a(parent) --> might be part of it (but is definitely not part of a single one) depending on your implementation (order of read nodes). regarding to a single node --> false