File tree 1 file changed +4
-4
lines changed
src/main/java/g0701_0800/s0770_basic_calculator_iv
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ private int countStars(String s) {
78
78
}
79
79
}
80
80
List <String > ans = new ArrayList <>();
81
- for (String k : map .keySet ()) {
82
- ans .add (map . get ( k ) + k );
81
+ for (Map . Entry < String , Integer > entry : map .entrySet ()) {
82
+ ans .add (entry . getValue ( ) + entry . getKey () );
83
83
}
84
84
return ans ;
85
85
}
@@ -137,7 +137,7 @@ private List<Term> multiply(List<Term> a, List<Term> b) {
137
137
List <Term > ans = new ArrayList <>();
138
138
for (Term x : a ) {
139
139
for (Term y : b ) {
140
- Term prod = x .clone ();
140
+ Term prod = x .copy ();
141
141
prod .multiply (y );
142
142
ans .add (prod );
143
143
}
@@ -174,7 +174,7 @@ public void multiply(Term that) {
174
174
}
175
175
}
176
176
177
- public Term clone () {
177
+ public Term copy () {
178
178
return new Term (coeff , vars );
179
179
}
180
180
}
You can’t perform that action at this time.
0 commit comments