Leetcode day 2 and 3

This commit is contained in:
2026-01-29 01:04:37 +05:30
parent 245116d181
commit 2ee49ea476
15 changed files with 204 additions and 1 deletions
View File
+4
View File
@@ -0,0 +1,4 @@
>for(const auto& [value,symbol] : valueSymbols)
here [value,symbol] in cpp is called structured binding that allows you to unpack the elements of a compound object (such as a std::pair, std::tuple, or struct) into separate, named variables.
Each element of valueSymbols is a pair<int, string> representing a Roman numeral value and its symbol. The syntax for (const auto& [value, symbol] : valueSymbols) unpackseach pair so that value refers to the numeric part and symbol refers to the Roman string