Skip to content

ДЗ 10 задачка2#2

Open
Starushenko wants to merge 3 commits into
mainfrom
ДЗ_10_задачка2

Hidden character warning

The head ref may contain hidden characters: "\u0414\u0417_10_\u0437\u0430\u0434\u0430\u0447\u043a\u04302"
Open

ДЗ 10 задачка2#2
Starushenko wants to merge 3 commits into
mainfrom
ДЗ_10_задачка2

Conversation

@Starushenko
Copy link
Copy Markdown
Owner

No description provided.

Comment thread src/main/java/Main.java
int[] nums_2 = {3,2,4};
int target_2 = 6;
int[] nums_3 = {3,3};
int target_3 = 6;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

camelCase we use in java not a a snakeCase

Comment thread src/main/java/Main.java

//maxProfit
int[] prices1 = {7,1,5,3,6,4};//5
int[] prices2 = {7,6,4,3,1};//0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

not a very good name

Comment thread src/main/java/Main.java
System.out.println(MaxProfit.maxProfit(prices2));

//reverseArray
int[] startArray = {1,2,3,4,5};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bad var name

Comment thread src/main/java/Main.java
}

private static boolean containsDuplicate(int[] nums) {
Set<Integer> set = new HashSet<>();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bad var name

Comment thread src/main/java/Main.java

private static int[] twoSum(int[] nums, int target) {
int[] result = new int[2];
Map<Integer, Integer> map = new HashMap<>();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bad var name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants