Skip to content

Commit f82c1a8

Browse files
refactor 670
1 parent 2252a0e commit f82c1a8

File tree

1 file changed

+0
-20
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-20
lines changed

src/main/java/com/fishercoder/solutions/_670.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 670. Maximum Swap
5-
*
6-
* Given a non-negative integer, you could swap two digits at most once to get the maximum valued number.
7-
* Return the maximum valued number you could get.
8-
9-
Example 1:
10-
Input: 2736
11-
Output: 7236
12-
Explanation: Swap the number 2 and the number 7.
13-
14-
Example 2:
15-
Input: 9973
16-
Output: 9973
17-
Explanation: No swap.
18-
19-
Note:
20-
The given number is in the range [0, 108]
21-
22-
*/
233
public class _670 {
244
public static class Solution1 {
255
public int maximumSwap(int num) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy