Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tcm-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TCM
tcm-system
Commits
2d6c3e88
Commit
2d6c3e88
authored
Jul 04, 2019
by
zjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/role/tright 7.3
parent
5b11b0ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
27 deletions
+0
-27
FinanceController.java
.../pangding/web/authority/controller/FinanceController.java
+0
-27
No files found.
src/main/java/com/pangding/web/authority/controller/FinanceController.java
View file @
2d6c3e88
...
...
@@ -9,8 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @Author zhangjinyao
...
...
@@ -30,29 +28,4 @@ public class FinanceController {
return
ResponseResult
.
result
(
financeServiceImpl
.
withdrawal
(
reqVo
));
}
@PostMapping
(
value
=
"/test"
)
public
List
<
List
<
Integer
>>
combinationSum
(
int
[]
candidates
,
int
target
)
{
List
<
List
<
Integer
>>
resList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
candidates
.
length
;
i
++)
{
List
<
Integer
>
list
=
method
(
candidates
,
target
);
resList
.
add
(
list
);
}
return
resList
;
}
private
List
<
Integer
>
method
(
int
[]
candidates
,
int
target
){
List
<
Integer
>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
candidates
.
length
;
i
++)
{
int
res
=
target
-
candidates
[
i
];
if
(
res
<
0
){
continue
;
}
else
if
(
res
==
0
){
list
.
add
(
candidates
[
i
]);
}
else
{
list
.
add
(
candidates
[
i
]);
List
<
Integer
>
nextList
=
method
(
candidates
,
res
);
list
.
addAll
(
nextList
);
}
}
return
list
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment