Skip to content

Commit a504624

Browse files
committed
Update consolidated snippets
1 parent 46c8207 commit a504624

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

public/consolidated/cpp.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,37 @@
1717
}
1818
]
1919
},
20+
{
21+
"categoryName": "Data Structure Conversion",
22+
"snippets": [
23+
{
24+
"title": "Vector to Set",
25+
"description": "Convert vector into set quickly",
26+
"author": "mrityunjay2003",
27+
"tags": [
28+
"cpp",
29+
"data structures",
30+
"set",
31+
"vector"
32+
],
33+
"contributors": [],
34+
"code": "#include <vector>\n#include <set>\n\nstd::set<int> vectorToSet(const std::vector<int>& v) {\n return std::set<int>(v.begin(), v.end());\n}\n"
35+
},
36+
{
37+
"title": "Vector to Queue",
38+
"description": "Convert vector into queue quickly",
39+
"author": "mrityunjay2003",
40+
"tags": [
41+
"cpp",
42+
"data structures",
43+
"queue",
44+
"vector"
45+
],
46+
"contributors": [],
47+
"code": "std::queue<int> vectorToQueue(const std::vector<int>& v) {\n return std::queue<int>(std::deque<int>(v.begin(), v.end()));\n}\n"
48+
}
49+
]
50+
},
2051
{
2152
"categoryName": "Math And Numbers",
2253
"snippets": [

0 commit comments

Comments
 (0)