本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140409033
需求
在尾部插⼊、删除元素是⽐较⾼效的,时间复杂度 是 O(1),但是如果在中间或者开头插⼊、删除元素,就会涉及数据的搬移,时间复杂度为 O(N),效率较低。
代码
1 |
|
输出
1 | 1 2 1 3 1 2 |
创作不易,小小的支持一下吧!


本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140409033
在尾部插⼊、删除元素是⽐较⾼效的,时间复杂度 是 O(1),但是如果在中间或者开头插⼊、删除元素,就会涉及数据的搬移,时间复杂度为 O(N),效率较低。
1 | #include <stdio.h> |
1 | 1 2 1 3 1 2 |


本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140405530
这也许是双指针技巧的最⾼境界了,如果掌握了此算法,可以解决⼀⼤类⼦字符串匹配的问题
1、我们在字符串 S 中使⽤双指针中的左右指针技巧,初始化 left = right = 0,把索引闭区间 [left, right] 称为⼀个「窗⼝」。
2、我们先不断地增加 right 指针扩⼤窗⼝ [left, right],直到窗⼝中的字符串 符合要求(包含了 T 中的所有字符)。
3、此时,我们停⽌增加 right,转⽽不断增加 left 指针缩⼩窗⼝ [left, right],直到窗⼝中的字符串不再符合要求(不包含 T 中的所有字符了)。 同时,每次增加 left,我们都要更新⼀轮结果。
4、重复第 2 和第 3 步,直到 right 到达字符串 S 的尽头。


1 | #include <stdio.h> |
1 | acbacb |
找到字符串中所有字⺟异位词?
⽆重复字符的最⻓⼦串?


本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140388319
1 |
|
https://github.com/woboq/property_bindings


本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140388180
1 | #define ORYOL_WINDOWS 1 |
输出
SymInit: Symbol-SearchPath: ‘.’, symOptions: 530, UserName: ‘admin’
OS-Version: 6.2.9200 () 0x100-0x1
D:\workspace\test\out\build\debug\test.exe:test.exe (00007FF668C60000), size: 884736 (result: 0), SymType: ‘PDB’, PDB: ‘.\test.pdb’
C:\Windows\SYSTEM32\ntdll.dll:ntdll.dll (00007FFD18170000), size: 2064384 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\SYSTEM32\ntdll.dll’
C:\Windows\System32\KERNEL32.DLL:KERNEL32.DLL (00007FFD17110000), size: 782336 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\System32\KERNEL32.DLL’
C:\Windows\System32\KERNELBASE.dll:KERNELBASE.dll (00007FFD15AF0000), size: 2957312 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\System32\KERNELBASE.dll’
C:\Windows\System32\SHLWAPI.dll:SHLWAPI.dll (00007FFD18000000), size: 348160 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\System32\SHLWAPI.dll’
C:\Windows\System32\msvcrt.dll:msvcrt.dll (00007FFD164D0000), size: 647168 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\System32\msvcrt.dll’
C:\Windows\System32\ADVAPI32.dll:ADVAPI32.dll (00007FFD18080000), size: 712704 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\System32\ADVAPI32.dll’
C:\Windows\System32\sechost.dll:sechost.dll (00007FFD17010000), size: 638976 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\System32\sechost.dll’
C:\Windows\System32\RPCRT4.dll:RPCRT4.dll (00007FFD17C10000), size: 1200128 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\System32\RPCRT4.dll’
C:\Windows\System32\bcryptPrimitives.dll:bcryptPrimitives.dll (00007FFD15A30000), size: 532480 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\System32\bcryptPrimitives.dll’
C:\Windows\SYSTEM32\RTWorkQ.DLL:RTWorkQ.DLL (00007FFD01970000), size: 212992 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\SYSTEM32\RTWorkQ.DLL’
C:\Windows\SYSTEM32\UMPDC.dll:UMPDC.dll (00007FFD14CA0000), size: 73728 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\SYSTEM32\UMPDC.dll’
C:\Windows\System32\QIPCAP64.dll:QIPCAP64.dll (0000000068000000), size: 466944 (result: 0), SymType: ‘-nosymbols-‘, PDB: ‘C:\Windows\System32\QIPCAP64.dll’
C:\Windows\SYSTEM32\DNSAPI.dll:DNSAPI.dll (00007FFD14D10000), size: 827392 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\SYSTEM32\DNSAPI.dll’
C:\Windows\SYSTEM32\IPHLPAPI.DLL:IPHLPAPI.DLL (00007FFD14CC0000), size: 241664 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\SYSTEM32\IPHLPAPI.DLL’
C:\Windows\System32\NSI.dll:NSI.dll (00007FFD16E70000), size: 32768 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\System32\NSI.dll’
C:\Windows\SYSTEM32\dbghelp.dll:dbghelp.dll (00007FFD0E350000), size: 1982464 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\SYSTEM32\dbghelp.dll’
C:\Windows\SYSTEM32\SspiCli.dll:SspiCli.dll (00007FFD15750000), size: 204800 (result: 0), SymType: ‘-exported-‘, PDB: ‘C:\Windows\SYSTEM32\SspiCli.dll’
D:\workspace\test\callstack\StackWalker.cc (1048): StackWalker::ShowCallstack
D:\workspace\test\callstack\StackTrace.cc (101): Oryol::StackTrace::Dump
D:\workspace\test\main_callstack2.cpp (11): func
D:\workspace\test\main_callstack2.cpp (15): test
D:\workspace\test\main.cpp (40): main
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (79): invoke_main
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (288): __scrt_common_main_seh
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl (331): __scrt_common_main
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp (17): mainCRTStartup
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFD17127614)
00007FFD17127614 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFD181C26A1)
00007FFD181C26A1 (ntdll): (filename not available): RtlUserThreadStart
https://github.com/ZFFramework/stack_trace


本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140362167
当使用 enum class 时,它具有更强的类型安全性和隔离性,因此需要显式转换才能访问其底层整数值。
std::underlying_type_t 是一个类型别名,它返回枚举类型的底层类型。
to_underlying 函数提供了一种方便的方式来执行这种转换,特别是在需要频繁进行此类转换的情况下。
1 | #include <type_traits> |
输出: 1,0


本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140361132
1 |
|
C++11中包含了以下几种String literal,


本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140332972
1 |
|
1 | #include <cstdio> |
输出: add(1+2)=3


本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140332918
1 |
|


tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true