implement code for approximate matching problem

Signed-off-by: Harsh Gupta <gupta.harsh96@gmail.com>