Searching a bit, you might check out Karmarkar's algorithm for solving linear programming problems in polynomial time. Note that it is literally called an "algorithm", and that linear programming problems were taught in my 11th grade math class. Yet it did eventually get patented, after controversy and publicity.
What makes you suggest Karmarkar's algorithm as relevant to Indian patent law? As the Wikipedia article you linked points out, Narendra Karmarkar left India in 1978, getting an M.S. from Caltech in 1979, PhD from Berkeley in 1983, and briefly joining IBM in California as a post-doc (1983) and then AT&T Bell Labs (later in 1983): he came up with Karmarkar's algorithm while at IBM and applied for the patent while at Bell Labs, so everything related to it happened in the US. (The fact that Karmarkar was from India, or that he returned to India in the late 1990s, has no bearing here.)
(Unless your comment was about software patents in general, and not India's patent law specifically.)
"In India, the software is not directly patented but it can be granted patent if it is attached with novel hardware, an invention that is unique and capable of industrial use."
So patenting a pure algo or data-structure will face legal hurdles.
This would be an interesting use case for making country specific distro ISOs/variants which don't have the usual patent issues (ala rpmfusion for things like ffmpeg etc.). However, there's no money to be recovered from such an exercise because all the legal analysis is funded by RedHat and there would be little payoff for doing this type of work. So it may not be so straightforward. And RedHat is now owned by IBM, which is synonymous with software patents. So not sure what that implies either.
https://en.wikipedia.org/wiki/Karmarkar%27s_algorithm
The patent, linked from above: https://patents.google.com/patent/US4744028