Question
The Rabin-Karp algorithm uses which technique to
efficiently compare substrings?Solution
The Rabin-Karp algorithm uses hashing to quickly filter out positions in the text that are unlikely to match the pattern. It computes a hash value for the pattern and then computes hash values for all possible substrings of the text of the same length as the pattern. If the hash values match, it then performs a character-by-character comparison to confirm a true match (to handle hash collisions).
The diagram represents the number of students studying different subjects. What is the number of students who study both Hindi and Chemistry?
In the given figure, how many pencils are black?
How many people belong to W group but not X group?
The following Venn diagram shows the number of students who like to eat three different fruits (Dates, Mango, Cherry)
In the given figure, which letter represents those teacher who teaches both Maths and Physics?
How many persons like all the activities i.e., Painting, Dancing and Music?

Which of the following diagrams best depicts the relationship between Tubelight, Mobile and Gadget.

Find the number of triangles in the following figure:
