Skip to content

Commit

Permalink
0937 bug fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyubobobo committed May 14, 2019
1 parent 4eec1e5 commit 2c4ec28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 0937-Reorder-Log-File/cpp-0937/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ project(A)

set(CMAKE_CXX_STANDARD 14)

add_executable(A main.cpp main2.cpp)
add_executable(A main2.cpp)
2 changes: 1 addition & 1 deletion 0937-Reorder-Log-File/cpp-0937/main2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Solution {
public:
vector<string> reorderLogFiles(vector<string>& logs) {

sort(logs.begin(), logs.end(), [](const string& log1, const string& log2) -> bool{
stable_sort(logs.begin(), logs.end(), [](const string& log1, const string& log2) -> bool{
int space1 = log1.find(' ');
string id1 = log1.substr(0, space1), after1 = log1.substr(space1 + 1);

Expand Down

0 comments on commit 2c4ec28

Please sign in to comment.