diff --git a/Offer_06/Offer_06.sln b/Offer_06/Offer_06.sln new file mode 100644 index 0000000..022f43c --- /dev/null +++ b/Offer_06/Offer_06.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30523.141 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Offer_06", "Offer_06\Offer_06.vcxproj", "{FAA714CB-4D13-437C-B3AA-57C0A88AF699}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FAA714CB-4D13-437C-B3AA-57C0A88AF699}.Debug|x64.ActiveCfg = Debug|x64 + {FAA714CB-4D13-437C-B3AA-57C0A88AF699}.Debug|x64.Build.0 = Debug|x64 + {FAA714CB-4D13-437C-B3AA-57C0A88AF699}.Debug|x86.ActiveCfg = Debug|Win32 + {FAA714CB-4D13-437C-B3AA-57C0A88AF699}.Debug|x86.Build.0 = Debug|Win32 + {FAA714CB-4D13-437C-B3AA-57C0A88AF699}.Release|x64.ActiveCfg = Release|x64 + {FAA714CB-4D13-437C-B3AA-57C0A88AF699}.Release|x64.Build.0 = Release|x64 + {FAA714CB-4D13-437C-B3AA-57C0A88AF699}.Release|x86.ActiveCfg = Release|Win32 + {FAA714CB-4D13-437C-B3AA-57C0A88AF699}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DE040915-DCA4-45C5-8C65-B2F928BF5754} + EndGlobalSection +EndGlobal diff --git a/Offer_06/Offer_06/Offer_06.vcxproj b/Offer_06/Offer_06/Offer_06.vcxproj new file mode 100644 index 0000000..2b23b74 --- /dev/null +++ b/Offer_06/Offer_06/Offer_06.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {faa714cb-4d13-437c-b3aa-57c0a88af699} + Offer06 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Offer_06/Offer_06/Offer_06.vcxproj.filters b/Offer_06/Offer_06/Offer_06.vcxproj.filters new file mode 100644 index 0000000..207161e --- /dev/null +++ b/Offer_06/Offer_06/Offer_06.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 源文件 + + + \ No newline at end of file diff --git a/Offer_06/Offer_06/Offer_06.vcxproj.user b/Offer_06/Offer_06/Offer_06.vcxproj.user new file mode 100644 index 0000000..0f14913 --- /dev/null +++ b/Offer_06/Offer_06/Offer_06.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Offer_06/Offer_06/test.c b/Offer_06/Offer_06/test.c new file mode 100644 index 0000000..9d4a52f --- /dev/null +++ b/Offer_06/Offer_06/test.c @@ -0,0 +1,46 @@ +#include +#include + +struct ListNode { + int val; + struct ListNode* next; + +}; + +int* reversePrint(struct ListNode* head, int* returnSize) //һͷڵ㣬βͷÿڵֵ鷵أ +{ + int n = 0; + *returnSize = 0; + int* ret1 = (int*)malloc(sizeof(int) * 1); + + if (head == NULL) + return 0; + + struct ListNode* prev = head; + while (prev) + { + ret1[n] = prev->val; + n++; + ret1 = (int*)realloc(ret1, sizeof(int) * (n + 1)); + prev = prev->next; + } + + int* ret = (int*)malloc(sizeof(int) * (n + 1)); + int i = 0; + while (n > 0) + { + n--; + ret[i] = ret1[n]; + + i++; + } + + *returnSize = i; + + return ret; +} + +int main() +{ + +} \ No newline at end of file