There is asentence which has confused me a lot.
Margarine category was recorded least.
Least recorded category was Margarine.
Which sentence is active and which is passive. I am facing difficulty in finding the mistake.
I'm a native UK English speaker and I have only a tentative idea, to me this is tricky.
My suggestion is reduce the two examples to the bare minimum:
X was recorded
we don't know by whom, call him Dave
X was recorded by Dave
That's passive, active would be
Dave recorded X
So your first sentence is passive. The second sentence "least recorded" is just an adjective describing the catgory, the actual verb is "was", reducing it:
The category was Margerine
That is like
Dave was tall
This is not passive. See this article for further discussion, under heading (3) in that article we have:
Understand the verb in a passive sentence. In a passive sentence, something happens to the subject. The verb is the action that happens. It begins with a "to be" verb (for example, "is," "was," "were," "has been," "will have been"), then a verb in a past tense.
In your example the "recorded" is not linked to the "was".