Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added tasks 922, 923, 924, 925, 926 #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
javadev merged 3 commits into javadev:main from ThanhNIT:tasks-922-923-924-925-926
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix comments
  • Loading branch information
ThanhNIT committed Feb 14, 2022
commit a3aca561e5f86524f9cf4d16c1465d3ea371e60f
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

public class Solution {
public int[] sortArrayByParityII(int[] nums) {
for (int i = 0, j = 1; i < nums.length - 1 && j < nums.length; ) {
int i = 0;
int j = 1;
while (i < nums.length - 1 && j < nums.length) {
if (nums[i] % 2 != 0 && nums[j] % 2 == 0) {
int tmp = nums[i];
nums[i] = nums[j];
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package g0901_1000.s0923_3sum_with_multiplicity;

// #Medium #Array #Hash_Table #Sorting #Two_Pointers #Counting

public class Solution {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comment with tags.

ThanhNIT reacted with thumbs up emoji
private static final int MOD = (int) 1e9 + 7;
private static final int MAX = 100;
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package g0901_1000.s0926_flip_string_to_monotone_increasing;

// #Medium #String #Dynamic_Programming

class Solution {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comment with tags and public for class.

ThanhNIT reacted with thumbs up emoji
public int minFlipsMonoIncr(String s) {
if (s == null || s.length() <= 1) {
Expand Down

AltStyle によって変換されたページ (->オリジナル) /