

1>
Frodo Baggins and Harry PotterUseless characters who make it to the end mainly by the virtue of having more talented friends and protectors.When they are finally done,you have a feeling that a donkey in their place would have sufficed.Two ordinary boys who have responsibility and power thrust on them.
My opinion:I liked neither much.
So
LOTR -0 HP -02>
Samwise Gamgee and Ronald WeasleyEqually useless friends of the useless main heroes described above.Again,two ordinary boys who do nothing but stick close to the main heroes right till the end and get to enjoy the limelight.
My opinion :I think the character of Ronald Weasley is better written than Samwise Gamgee..
So
LOTR-0 HP-13>
Gandalf (the grey and white) and Albus DumbledoreOld 'know it all' men.These are perhaps the characters who know the end of the story even before the author does.When you reach the end you have no choice but to wonder "Why didnt these old men act when they had time!!!".But anyway the main purpose of their existence is to look after our useless heroes and guide them and make sure they are well protected right till the end.
My opinion : Gandalf the grey is kinda boring but Gandalf the white is equally charismatic as Albus Dumbledore.
So
LOTR -1 HP-24>
Aragorn and Sirius BlackYoung men who have been wronged in the past but have never left the good side.They have sworn their lives to the protection of our useless heroes.Now these are perhaps the best characters of both the books.And you feel that they are actually capable of "doing" something.
My opinion : Sirius is no match for Aragorn.
So
LOTR -2 HP -25>
Merry and Pippin and the Weasley twinsCharacters introduced for humour.Dont do much right till the end but do manage to entertain you.
My opinion : Merry and Pippin are a tinge funnier than the Weasley twins
So
LOTR-3 HP-26>
Sauron and Lord VoldemortThe two "BAD men(?)".By direct comparison you realise that they would shoo away our useless heroes like a fly on a tea cup.Both surprisingly dont appear in physical form for a very long time but exist as spirits for a major portion of HP and the entire LOTR.
My opinion : Sauron shouldn't even be allowed to stand before Lord Voldemort (\m/)
So
LOTR-3 HP-37>
Other possible comparisons :Saruman the wise and Bellatrix Lestrange
Legolas and Gimli and Lupin and Weasley
Boromir and Snape
Gollum and Dobby
(All are more or less equally well written)
As far as the books are concerned,LOTR wastes 50 pages on absolutely boring and useless characters like Tom Bombaddil and long songs.HP on the other hand is written quite to-the-point.From readers point of view HP goes way easy on eyes and brains than LOTR.
But when it comes to movies the tables turn completely.HP movies are disappointing.LOTR movies on the other hand are must-watch. (Specially the war sequences)
I assure you that inspite of my criticizing the characters the way I have,I love both the books!
And I am sure many will have completely different opinions.As always ,they are welcome in the form of comments !
Happy reading !