Hi Ratnakar,
The DuplicateResult class and its methods are available to organizations that use duplicate rules. DuplicateResult class represents the details of a duplicate rule that detected duplicate records and information about those duplicate records.
So you can take help of it and for more guidance about it, you may refer the standard salesforce guide as per your usage.
Hope this helps you.