Closed
Description
Hey, followed the example from
# ~/.leetcode/scripts/plan1.py
import json;
def plan(sps, stags):
##
# `print` in python is supported,
# if you want to know the data structures of these two args,
# just print them
##
problems = json.loads(sps)
tags = json.loads(stags)
ret = []
tm = {}
for tag in tags:
tm[tag["tag"]] = tag["refs"];
for i in problems:
if i["level"] == 1 and str(i["id"]) in tm["linked-list"]:
ret.append(str(i["id"]))
# return is `List[string]`
return ret
$ ls ~/.leetcode/scripts
blind75.py plan1.py
leetcode list -p plan1
...
🔒 [2282] Number of People That Can Be Seen in a Grid Medium (50.67 %)
🔒 [2291] Maximum Profit From Trading Stocks Medium (48.73 %)
🔒 [2292] Products With Three or More Orders in Two Consecutive Years Medium (36.96 %)
🔒 [2298] Tasks Count in the Weekend Medium (87.84 %)
🔒 [2308] Arrange Table by Gender Medium (78.74 %)
🔒 [2314] The First Day of the Maximum Recorded Degree in Each City Medium (79.27 %)
🔒 [2324] Product Sales Analysis IV Medium (87.50 %)
🔒 [2329] Product Sales Analysis V Medium (82.71 %)
🔒 [2323] Find Minimum Time to Finish All Jobs II Medium (78.78 %)
🔒 [2330] Valid Palindrome IV Medium (78.99 %)
...
Still getting all of the problems
Metadata
Metadata
Assignees
Labels
No labels