Skip to content

Unable to represent single node as vector #96

@c-git

Description

@c-git

Describe the bug

The problem represents single nodes as just an integer but the code expects a vector

Leetcode problem

https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree

To Reproduce

cargo leet gen https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree

Error Message

% cargo leet gen https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
[2024-10-03T18:22:37Z WARN  cargo_leet::tool::core::helpers::problem_code] Type Mismatch? Type detected as 'Tree' but got argument value of "2". Error: Expecting something that can be represented as a vec but got "2"
[2024-10-03T18:22:37Z WARN  cargo_leet::tool::core::helpers::problem_code] Type Mismatch? Type detected as 'Tree' but got argument value of "8". Error: Expecting something that can be represented as a vec but got "8"
[2024-10-03T18:22:37Z WARN  cargo_leet::tool::core::helpers::problem_code] Type Mismatch? Type detected as 'Tree' but got argument value of "6". Error: Expecting something that can be represented as a vec but got "6"
[2024-10-03T18:22:37Z WARN  cargo_leet::tool::core::helpers::problem_code] Type Mismatch? Type detected as 'Tree' but got argument value of "2". Error: Expecting something that can be represented as a vec but got "2"
[2024-10-03T18:22:37Z WARN  cargo_leet::tool::core::helpers::problem_code] Type Mismatch? Type detected as 'Tree' but got argument value of "4". Error: Expecting something that can be represented as a vec but got "4"
[2024-10-03T18:22:37Z WARN  cargo_leet::tool::core::helpers::problem_code] Type Mismatch? Type detected as 'Tree' but got argument value of "2". Error: Expecting something that can be represented as a vec but got "2"
[2024-10-03T18:22:37Z WARN  cargo_leet::tool::core::helpers::problem_code] Type Mismatch? Type detected as 'Tree' but got argument value of "2". Error: Expecting something that can be represented as a vec but got "2"
[2024-10-03T18:22:37Z WARN  cargo_leet::tool::core::helpers::problem_code] Type Mismatch? Type detected as 'Tree' but got argument value of "1". Error: Expecting something that can be represented as a vec but got "1"
[2024-10-03T18:22:37Z WARN  cargo_leet::tool::core::helpers::problem_code] Type Mismatch? Type detected as 'Tree' but got argument value of "2". Error: Expecting something that can be represented as a vec but got "2"
Generated module: lowest_common_ancestor_of_a_binary_search_tree

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions