Skip to content

Commit fcbcefc

Browse files
committed
93 Reorder List.
1 parent fa08f12 commit fcbcefc

18 files changed

+349
-1
lines changed

demo.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,6 +2316,31 @@
23162316
"notes": "",
23172317
"problem": "Binary Tree Maximum Path Sum",
23182318
"tags": []
2319+
},
2320+
"93": {
2321+
"Address": "Central Campus Mall, Boulder, CO 80302, USA",
2322+
"Geolocation": {
2323+
"city": "Boulder",
2324+
"country_code": "US",
2325+
"country_name": "United States",
2326+
"ip": "128.138.143.155",
2327+
"latitude": "40.015",
2328+
"longitude": "-105.2706",
2329+
"metro_code": "751",
2330+
"region_code": "CO",
2331+
"region_name": "Colorado",
2332+
"time_zone": "America/Denver",
2333+
"zip_code": "80309"
2334+
},
2335+
"date": "Wed, Mar 21, 2018 03:40:07 PM",
2336+
"description": "",
2337+
"link": {
2338+
"jiuzhangsuanfa": "http://www.lintcode.com/en/problem/reorder-list/",
2339+
"lintcode": "http://www.jiuzhang.com/solution/reorder-list/"
2340+
},
2341+
"notes": "",
2342+
"problem": "Reorder List",
2343+
"tags": []
23192344
}
23202345
}
23212346
}

message.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
92 Binary Tree Maximum Path Sum.
1+
93 Reorder List.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
https://stackoverflow.com/questions/30046411/define-multiple-tasks-in-vscode
2+
3+
{ "command": "myCommand"
4+
"args": ["myCommandArguments"],
5+
"tasks" : [
6+
{ "taskName": "myTask",
7+
"args": ["myTaskArguments"],
8+
"suppressTaskName": false,
9+
}
10+
]
11+
}
12+
13+
The above definition will result in the following command:
14+
15+
myCommand myCommandArguments myTaskArguments myTask
16+
17+
The task name myTask is always last. Since version 0.4 it can be omitted with "suppressTaskName": true.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Mac",
5+
"includePath": [
6+
"${workspaceRoot}",
7+
"${workspaceRoot}/../../include",
8+
"/usr/include",
9+
"/usr/local/include"
10+
],
11+
"defines": [],
12+
"intelliSenseMode": "clang-x64",
13+
"browse": {
14+
"path": [
15+
"/usr/include",
16+
"/usr/local/include",
17+
"${workspaceRoot}/../../include",
18+
"${workspaceRoot}"
19+
],
20+
"limitSymbolsToIncludedHeaders": true,
21+
"databaseFilename": ""
22+
},
23+
"macFrameworkPath": [
24+
"/System/Library/Frameworks",
25+
"/Library/Frameworks"
26+
]
27+
},
28+
{
29+
"name": "Linux",
30+
"includePath": [
31+
"${workspaceRoot}",
32+
"${workspaceRoot}/../../include",
33+
"/usr/include",
34+
"/usr/local/include",
35+
"/usr/include/x86_64-linux-gnu/c++/5",
36+
"/usr/lib/gcc/x86_64-linux-gnu/5/include",
37+
"/usr/include/c++/5"
38+
],
39+
"defines": [],
40+
"intelliSenseMode": "clang-x64",
41+
"browse": {
42+
"path": [
43+
"/usr/include",
44+
"/usr/local/include",
45+
"${workspaceRoot}/../../include",
46+
"${workspaceRoot}"
47+
],
48+
"limitSymbolsToIncludedHeaders": true,
49+
"databaseFilename": ""
50+
}
51+
},
52+
{
53+
"name": "Win32",
54+
"includePath": [
55+
"${workspaceRoot}",
56+
"${workspaceRoot}/../../include",
57+
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/include/*",
58+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
59+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
60+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
61+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
62+
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/include/*",
63+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um",
64+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt",
65+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared",
66+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/winrt",
67+
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.12.25827/include/*"
68+
],
69+
"defines": [
70+
"_DEBUG",
71+
"UNICODE"
72+
],
73+
"intelliSenseMode": "msvc-x64",
74+
"browse": {
75+
"path": [
76+
"${workspaceRoot}",
77+
"${workspaceRoot}/../../include",
78+
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.11.25503/include/*",
79+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
80+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
81+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
82+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
83+
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/include/*",
84+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/um",
85+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/ucrt",
86+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/shared",
87+
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.16299.0/winrt"
88+
],
89+
"limitSymbolsToIncludedHeaders": true,
90+
"databaseFilename": ""
91+
}
92+
}
93+
],
94+
"version": 3
95+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "(Windows) Launch",
6+
"type": "cppvsdbg",
7+
"request": "launch",
8+
"program": "${workspaceRoot}/solution.exe",
9+
"args": [],
10+
"stopAtEntry": false,
11+
"cwd": "${workspaceRoot}",
12+
"environment": [],
13+
"externalConsole": false
14+
},
15+
{
16+
"name": "(gdb) Launch",
17+
"type": "cppdbg",
18+
"request": "launch",
19+
"program": "${workspaceRoot}/solution.exe",
20+
"args": [],
21+
"stopAtEntry": false,
22+
"cwd": "${workspaceRoot}",
23+
"environment": [],
24+
"externalConsole": true,
25+
"MIMode": "gdb",
26+
"setupCommands": [
27+
{
28+
"description": "Enable pretty-printing for gdb",
29+
"text": "-enable-pretty-printing",
30+
"ignoreFailures": true
31+
}
32+
]
33+
}
34+
]
35+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.associations": {
3+
"climits": "cpp"
4+
}
5+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"version": "0.1.0",
3+
"tasks": [
4+
{
5+
"taskName": "build",
6+
"args": [],
7+
"isBuildCommand": true,
8+
"showOutput": "silent",
9+
"suppressTaskName": true
10+
}
11+
],
12+
"windows": {
13+
"command": "build.bat",
14+
"isShellCommand": true,
15+
"showOutput": "always"
16+
},
17+
"linux": {
18+
"command": "g++",
19+
"args": [
20+
"-g",
21+
"-std=c++11",
22+
"-o",
23+
"solution.exe",
24+
"solution.cpp"
25+
],
26+
"isShellCommand": true,
27+
"showOutput": "always",
28+
"problemMatcher": {
29+
"owner": "cpp",
30+
"fileLocation": [
31+
"relative",
32+
"${workspaceRoot}"
33+
],
34+
"pattern": {
35+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
36+
"file": 1,
37+
"line": 2,
38+
"column": 3,
39+
"severity": 4,
40+
"message": 5
41+
}
42+
}
43+
},
44+
"osx": {
45+
"command": "clang++",
46+
"args": [
47+
"solution.cpp",
48+
"-v"
49+
],
50+
"isShellCommand": true,
51+
"showOutput": "always",
52+
"problemMatcher": {
53+
"owner": "cpp",
54+
"fileLocation": [
55+
"relative",
56+
"${workspaceRoot}"
57+
],
58+
"pattern": {
59+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
60+
"file": 1,
61+
"line": 2,
62+
"column": 3,
63+
"severity": 4,
64+
"message": 5
65+
}
66+
}
67+
}
68+
}

src/93_reorder_list/build.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@echo off
2+
pushd %cd%
3+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
4+
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
5+
popd
6+
echo %cd%
7+
set compilerflags=/Od /Zi /EHsc
8+
set linkerflags=/OUT:solution.exe
9+
set source=../../include/fileIO/fileIO.cpp ../../include/dataStructure/dataStructure.cpp ../../include/misc/misc.cpp
10+
11+
cl.exe %compilerflags% solution.cpp %source% /link %linkerflags%

src/93_reorder_list/dataStructure.obj

1.65 KB
Binary file not shown.

src/93_reorder_list/fileIO.obj

619 KB
Binary file not shown.

0 commit comments

Comments
 (0)