+1 vote
in Data Structures & Algorithms I by (110k points)
Which one of the following operations returns the first occurrence of bit 1 in bit arrays?

(a) Find First Zero

(b) Find First One

(c) Counting lead Zeroes

(d) Counting lead One

The query is from Bit Array topic in portion Arrays Types of Data Structures & Algorithms I

This question was posed to me by my college director while I was bunking the class.

1 Answer

+1 vote
by (408k points)
selected by
 
Best answer
The correct option is (b) Find First One

The best explanation: Find First One operation returns the first occurrence of bit 1 in the bit array. Find First Zero operation returns the first occurrence of bit 0 in the bit array. If the most significant bit in bit array is 1, then count lead zeroes operation returns the number of zeroes present before the most significant bit. If the most significant bit in bit array is 0, then the count lead one returns the number of ones present before the most significant bit.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...