Not ever problem can be solved by hashing. But most of the interview questions are asked from hashing only. SO always be updated on this topic.
For example :- Suppose you are given a file having millions of words. Now you have to calculate the frequency of each word.
For such kind of purposes we use hashing only.
For such kind of purposes we use hashing only.
Hashing helps in decreasing the search time of your algorithm. Always take care of collision related problems while implementing hashing.
There are many hash functions already created and used for some value of k . but they all suffer collision problem to some extent
0 comments: