Solution :
We have to provide an expression for the binary numbers. There can be binary fractions or integers. Whenever there is leading 0, it is not allowed unless the integer part is a 0.
Thus the expression is :
![$(\in +.(0+1)^*(0+1))+(0.(0+1)^*(0+1))]$](https://tex.z-dn.net/?f=%24%28%5Cin%20%2B.%280%2B1%29%5E%2A%280%2B1%29%29%2B%280.%280%2B1%29%5E%2A%280%2B1%29%29%5D%24)
Answer:
Finding kth element is more efficient in a doubly-linked list when compared to a singly-linked list
Explanation:
Assuming that both lists have firs_t and last_ pointers.
For a singly-linked list ; when locating a kth element, you have iterate through a number of k-1 elements which means that locating an element will be done only in one ( 1 ) direction
For a Doubly-linked list : To locate the Kth element can be done from two ( directions ) i.e. if the Kth element can found either by traversing the number of elements before it or after it . This makes finding the Kth element faster because the shortest route can be taken.
<em>Finding kth element is more efficient in a doubly-linked list when compared to a singly-linked list </em>