Click here to Skip to main content
15,912,082 members

Comments by Amy Zhou (Top 8 by date)

Amy Zhou 17-Sep-20 4:20am View    
https://leetcode.com/problems/next-greater-node-in-linked-list/

This is the input and output required by this question.
Amy Zhou 17-Sep-20 4:18am View    
I know this, but how to match the title requirements is presented in "vector<int> nextLargerNodes(ListNode* head)" I don't understand...
Amy Zhou 17-Sep-20 4:16am View    
Like the example input and output of Leetcode's official website.

Example 1:

Input: [2,1,5]
Output: [5,5,0]

Example 2:

Input: [2,7,4,3,5]
Output: [7,0,5,5,0]
Amy Zhou 2-Sep-20 3:59am View    
I'm sorry, I would like to ask about the place to determine the change. Is it under my project workspace, and then in the task.json below, the place corresponding to "args" is changed to "-std=c++latest"?
Amy Zhou 1-Sep-20 23:12pm View    
Thank you very much. The current situation is that the print result problem has been solved. I can use the online compiler to execute it, but the Visual Studio 2019 for Mac I use has the following problems:

warning: generalized initializer lists are a C++11 extension [-Wc++11-extensions]
return {i,indies[left]};

error: non-aggregate type 'vector<int>' cannot be initialized with an initializer list
return {i,indies[left]};

warning: generalized initializer lists are a C++11 extension [-Wc++11-extensions]
return {};

error: non-aggregate type 'vector<int>' cannot be initialized with an initializer list
return {};

error: non-aggregate type 'vector<int>' cannot be initialized with an initializer list
vector<int> number = {2, 7, 11, 15};

I had read many related solutions, such as changing to "-std=c++11" and so on, but there is still no way to solve the error. Could you please teach me how to solve it...