File tree Expand file tree Collapse file tree 1 file changed +76
-0
lines changed Expand file tree Collapse file tree 1 file changed +76
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,82 @@ int main(int argc, char *argv[])
88
88
89
89
return 0;
90
90
}
91
+ ```
92
+ This program outputs the following.
93
+ ```
94
+ Presidents in order of insertion
95
+ soa {
96
+ 0, Abraham, Lincoln
97
+ 3, Barack, Obama
98
+ 2, George, Bush
99
+ 1, Bill, Clinton
100
+ 4, Donald, Trump
101
+ 5, Joe, Biden
102
+ }
103
+
104
+ Presidents sorted by temporal order
105
+ soa {
106
+ 0, Abraham, Lincoln
107
+ 1, Bill, Clinton
108
+ 2, George, Bush
109
+ 3, Barack, Obama
110
+ 4, Donald, Trump
111
+ 5, Joe, Biden
112
+ }
113
+
114
+ Presidents sorted by first name
115
+ soa {
116
+ 0, Abraham, Lincoln
117
+ 3, Barack, Obama
118
+ 1, Bill, Clinton
119
+ 4, Donald, Trump
120
+ 2, George, Bush
121
+ 5, Joe, Biden
122
+ }
123
+
124
+ Presidents sorted by last name
125
+ soa {
126
+ 5, Joe, Biden
127
+ 2, George, Bush
128
+ 1, Bill, Clinton
129
+ 0, Abraham, Lincoln
130
+ 3, Barack, Obama
131
+ 4, Donald, Trump
132
+ }
133
+
134
+ Editing the first row to update Joe => Joseph
135
+ soa {
136
+ 5, Joseph, Biden
137
+ 2, George, Bush
138
+ 1, Bill, Clinton
139
+ 0, Abraham, Lincoln
140
+ 3, Barack, Obama
141
+ 4, Donald, Trump
142
+ }
143
+
144
+ Editing the third row to update Abraham Lincoln => George Washington
145
+ soa {
146
+ 5, Joseph, Biden
147
+ 2, George, Bush
148
+ 1, Bill, Clinton
149
+ 0, George, Washington
150
+ 3, Barack, Obama
151
+ 4, Donald, Trump
152
+ }
153
+
154
+ Summing first name lengths
155
+ Total characters used in first names = 34
156
+
157
+ Sorting by number of characters in the last name.
158
+ soa {
159
+ 2, George, Bush
160
+ 5, Joseph, Biden
161
+ 3, Barack, Obama
162
+ 4, Donald, Trump
163
+ 1, Bill, Clinton
164
+ 0, George, Washington
165
+ }
166
+
91
167
```
92
168
93
169
Benchmark
You can’t perform that action at this time.
0 commit comments