https://leetcode.com/problems/largest-odd-number-in-string/



Time Limit Exceeded



```typescript
function largestOddNumber(num: string): string {
    //2:08
    const char_list = num.split("")
    let largest = BigInt(-1)
    let largest_string = ""
    for (const [index_a, char] of char_list.entries()) {
        for (const [index_b, char] of char_list.slice(index_a, char_list.length).entries()) {
            const sub_list = char_list.slice(index_a, index_a+index_b+1)
            //console.log(sub_list)
            const aNum_string = sub_list.join("")
            const aNum = BigInt(aNum_string)
            //console.log(aNum)
            if (aNum % BigInt(2) == BigInt(1)) {
                if (aNum > largest) {
                    largest = aNum
                    largest_string = aNum_string
                }
            }
        }
    }
    return largest == BigInt(-1)? "": largest_string
    //2:15
    //debug until 2:28. use BigInt for big numbers
};
```
