CoolFace
Datasetpublic

FPEvalDataset/LeetCodeProblem

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes304downloads
1{2    "id": 2346,3    "name": "largest_3_same_digit_number_in_string",4    "difficulty": "Easy",5    "link": "https://leetcode.com/problems/largest-3-same-digit-number-in-string/",6    "date": "1651363200000",7    "task_description": "You are given a string `num` representing a large integer. An integer is **good** if it meets the following conditions: It is a **substring** of `num` with length `3`. It consists of only one unique digit. Return _the **maximum good **integer as a **string** or an empty string _`\"\"`_ if no such integer exists_. Note: A **substring** is a contiguous sequence of characters within a string. There may be **leading zeroes** in `num` or a good integer. **Example 1:** ``` **Input:** num = \"6**777**133339\" **Output:** \"777\" **Explanation:** There are two distinct good integers: \"777\" and \"333\". \"777\" is the largest, so we return \"777\". ``` **Example 2:** ``` **Input:** num = \"23**000**19\" **Output:** \"000\" **Explanation:** \"000\" is the only good integer. ``` **Example 3:** ``` **Input:** num = \"42352338\" **Output:** \"\" **Explanation:** No substring of length 3 consists of only one unique digit. Therefore, there are no good integers. ``` **Constraints:** `3 <= num.length <= 1000` `num` only consists of digits.",8    "public_test_cases": [9        {10            "label": "Example 1",11            "input": "num = \"6 777 133339\"",12            "output": "\"777\" "13        },14        {15            "label": "Example 2",16            "input": "num = \"23 000 19\"",17            "output": "\"000\" "18        },19        {20            "label": "Example 3",21            "input": "num = \"42352338\"",22            "output": "\"\" "23        }24    ],25    "private_test_cases": [26        {27            "input": "10848558887451529562399824892249063295573302687714867726247825433478151593337015096112051310847176327315141750783505626390086820407142390143245980885287222547268009922288777421999646781790623902395690852955261930974507683651781052764181531519406441588049860448279820190326072303401308854006875409945113367931462657349059435994309403688692483386511557263512248119174669415680021146134368168641485458863809062016363211760308798332797013996524554539119951980156840185313585280974915529699426546397375719595837896905261529054565778111577698713553780623651880170767949347530394813704341638",28            "output": "999"29        },30        {31            "input": "47426887255841422940727384852730590925752629600461180972805741763417704395379701210464218806703804072608752847941624061081658686280785200554805253619349685885942473902642709150888213438209447899894695762278301896326216623576645899005329681998611857335207020091684599884375447207140846748585060448073488871336378667426183006251333530352645026079207079820085188588225338629872770617352545578100593172982482968114648138595773007135325437308180554918312316885129706463065683580270278214127636296513925573704533193724048330356471280986019273010628214900294417125830680531377939952202615423688744012249155193863324220542775405412695545033719536175067598",32            "output": "888"33        },34        {35            "input": "738048384163579046383583833585912061948169810763177715912952198244475182441915240510976498436468260847762946176312085113761419723199738383317650905495713028734366898353750356501857264217487816791462260304703996646548589984109946029889087074038837401879926731522053424082740552484458556141012986908489664361034712674798183682358121322422727327775867082605111873434076280759183034541099684312367252818106017173713189962367426025799925273962404207651562189536961238750014240495266902618014127358110",36            "output": "999"37        },38        {39            "input": "20209784743196939784503944352089875700757627790781375962866866897339998345279606032590560921191153900901217428584457899591916460620332246009942800379661594647183473452387479278",40            "output": "999"41        },42        {43            "input": "5548411556853590416728324497574743015738062966157881918587275799498324254891201497937916087812096852463024601053540406806014368947907700213158922587772111582606976647591232449570189253693801976582802678787871592640766663151224166469861611051645946723863666620586842480784895086975849009496917114341012115611574410200760492269029887282845090751641664131834193490342560824893101621115484103030906658884933319211841797040599649151593415819890038165746674486932597067412598642726350922112753967970479449354460410399642921789698638403523272017435958293407514573868403682632134909546250734669056158526269736151210092915267407485144474174648124028098994591181856301661714408984341484382249893726323167469163608227536254186333361296577399543594732138365012586708407952133229323240176647215489372222648254470081490670569912768094801133377396885230518233709570493860745619332564152012171202667306890633847",44            "output": "888"45        },46        {47            "input": "558525214095448955075293446516741317848899534263253659714969548538738896733587016157594097166156961465068886993616599233235575574253106995756424997751023279574655895299604787669434430530006232982727869806217550043060031283000485437785611173056520932958592543020874993056623503627914716866740549037015273784660398273336309731368846714406153875804705165867472496302049541597901054592319961085200123720743229473369900345481168420681958520154188010844049730046362087710601569818455449533216053633240277062901686347717518799557090381335773315864913595606650763016396816130021049818084514266021140810691169199426856648221714310905439742373487964511096693923320932883427943953528346180391862832239992394318766928921213132255018702404961490512070768896288605312098100187510316946786850302260956581916503053769258372468287640849019088767045065299883312331560866766978438026276010235268705298714763336461678270700044688044003565498076558337307885125128995792440009567308781585222016993605548158659339",48            "output": "999"49        },50        {51            "input": "7029428553518057506087288381487004528774546027105731217319980930568153760239755254772763611258652044522879026884683174253528954935951924484478059289938763129895022785439420687113132718393277231777614081060012540902746326704193450214686259678250262851492006776095673921170023997649457212121734252152627660806578130862885626190793550563162744431620498857462015960496611632",52            "output": "777"53        },54        {55            "input": "4902847507944205784467343917307446625649954161420242735051679920785132253773660918691653055989260793055207678807054119888813957105913335159277604331712018553437799924689478182041481071606774575296428378536353903946866248258335665780194100675057743725989345525729226449619032570030072293099228681280030896534120669216535295233011330709920943739779679238568815078735099645380852756656994093598712184309843557743341128799774197778332014399991434246439692465833415668027964663378426500733234336131086158741292124106803012897761155320813977887077054757282048240592974899562094707461088031625946412261991141201914584379238169650853034705104313004191342093594533966262243356985107328289571005772800507513647042060399148943317657784840471533287314680052360139786671772862796245336631159214389698775846585291187816582504783139767628347596575393589169856443961988168385579030247114186306753223282344943495738596849347457715787371991483550275393599644744460745184919328185476626",56            "output": "999"57        },58        {59            "input": "4365758523152195793307564181162714472668301306525818573644014370240915474969378280181940401695283",60            "output": ""61        },62        {63            "input": "56751877305078539977603477691615457057182065594309404668558405080994224124818937407320253425653684924596773282542500377439669321234068503948396228776002741129116604083751237347680099661746407568875925195",64            "output": ""65        }66    ],67    "haskell_template": "largestGoodInteger :: String -> String\nlargestGoodInteger num ",68    "ocaml_template": "let largestGoodInteger (num: string) : string =  ",69    "scala_template": "def largestGoodInteger(num: String): String = { \n    \n}",70    "java_template": "public static String largestGoodInteger(String num) {\n\n}",71    "python_template": "class Solution(object):\n    def largestGoodInteger(self, num):\n        \"\"\"\n        :type num: str\n        :rtype: str\n        \"\"\"\n        "72}