Closed j178 closed 1 year ago
Another kind of problem: the output string is not standard https://leetcode.cn/problems/linked-list-cycle-ii/
- judgement for questions without return value, they change the input parameter in-place, like https://leetcode.cn/problems/reorder-list/
For this type of questions, there is actually a paramindex
in questions' metadata:
{
"name": "reorderList",
"params": [
{
"name": "head",
"type": "ListNode"
}
],
"return": {
"type": "void"
},
"output": {
"paramindex": 0
}
}
we can use this info to serialize the corresponding paramater as output.
a new special case: https://leetcode.cn/problems/find-positive-integer-solution-for-a-given-equation/ this function takes a function as first parameter 🤯
https://leetcode.cn/problems/first-bad-version/ https://leetcode.cn/problems/implement-rand10-using-rand7/
Also there are problems with pre-defined APIs.
We can use a little script to get some hints about these pre-definied function: