Leetcode problems list does not have the statistic quantity function, has written one conveniently.
The following two paragraphs just use jquery to adjust what's displayed on the page, and it's useless to refresh the page.
For example, to see how many easy, medium and hard topics There are, run the following code in the browser console.
There is also a usage, for example, see how many did not do, or did not do the question how many easy, medium and hard, first select the unsolved problems filter, and then run the code with the console.
1 //Count Problems2 varList = $ ("tbody > TR"). Not (". Hide")), tdlist, HTML;3Console.log ("---Count problems:" +list.length);4 varCounteasy = 0, Countmedium = 0, Counthard = 0;5 for(vari = 0; i < list.length; i++){6Tdlist = $ (list[i]). FIND ("TD");7HTML = $ (tdlist[tdlist.length-1]). HTML (). toUpperCase ();8 if(html = = = "Easy"){ 9counteasy++;Ten}Else if(html = = = "MEDIUM")){ Onecountmedium++; A}Else if(html = = = "Hard"){ -counthard++; - } the } -Console.log ("---Count easy:" +counteasy); -Console.log ("---Count Medium:" +countmedium); -Console.log ("---Count hard:" + counthard);
The following paragraph hides all locked topics:
1 //Hide Locked problems2 varList = $ ("Tbody > TR");3 for(vari = 0; i < list.length; i++){4 if($ (List[i]). FIND ("td > I.fa-lock"). Length > 0){5$ (List[i]). addclass ("Hide");6 //List[i].remove ();7 }8}
[Leetcode] Gadget, statistic number, hidden locked topic