File tree 1 file changed +6
-27
lines changed
CodeWars/src/UpsideDownNumbers
1 file changed +6
-27
lines changed Original file line number Diff line number Diff line change @@ -35,42 +35,21 @@ struct DigitStore
35
35
throw std::logic_error (" Both internal digits store are to be the same size" );
36
36
37
37
}
38
- int nextOrigDigit ()
39
- {
40
- return origDigitStore.front ();
41
- }
38
+ int nextOrigDigit () { return origDigitStore.front (); }
42
39
43
- int nextReverseDigit ()
44
- {
45
- return reverseDigitStore.top ();
46
- }
40
+ int nextReverseDigit () { return reverseDigitStore.top (); }
47
41
48
- void pop ()
49
- {
50
- origDigitStore.pop ();
51
- reverseDigitStore.pop ();
52
- }
42
+ void pop () { origDigitStore.pop (); reverseDigitStore.pop (); }
53
43
54
- int size ()
55
- {
56
- return origDigitStore.size ();
57
- }
44
+ int size () { return origDigitStore.size (); }
58
45
59
- bool empty ()
60
- {
61
- return !size ();
62
- }
46
+ bool empty () { return !size (); }
63
47
64
48
std::queue<int > origDigitStore;
65
49
std::stack<int > reverseDigitStore;
66
-
67
50
};
68
51
69
- bool singleDigit (int x)
70
- {
71
- return !x / 10 ;
72
- }
73
-
52
+ bool singleDigit (int x) { return !x / 10 ; }
74
53
75
54
int solve (int x, int y)
76
55
{
You can’t perform that action at this time.
0 commit comments