Code Summary
This code is a solution to the Lv1 three mstier problem, which is a problem that involves finding the most efficient way to solve a given problem. The code defines a class Solution which contains a method ret_star that takes a
This code is a solution to the Kakao Blind Recruitment Level 1 problem. It takes in two arrays, one containing the list of user IDs and the other containing the reports of users, and an integer k. It then returns an
This code is a solution to the Tmax No.1 problem. It takes in two arrays, one containing the preferences of each participant and the other containing the amount of coffee they have. It then sorts both arrays and calculates the difference between
이 코드는 주어진 문자열에서 괄호를 제
This code is a solution to the Lv1_yenyangPlus problem. It takes in an array of integers (absolutes) and an array of booleans (signs) and returns the sum of the numbers in the
This code defines an interface called Comparable that takes a generic type parameter T. The interface contains a single method, compareTo, which takes an object of type T as a parameter and returns an integer. This method can be used to compare
This code is a solution to the Tmax No2 problem. It is a program that calculates the final balance of each user after a series of transactions. The program takes in an array of balances, a 2D array of transactions, and
This code creates a custom Integer class that implements the Comparable interface. The compareTo() method is overridden to compare two Integer objects and return an integer value indicating their relative order.
This code is a solution to a problem involving stacks. It takes a string as input and checks if the parentheses in the string are balanced. If the parentheses are balanced, it returns "YES", otherwise it returns "NO".
This code is a solution to the Gold 10986 problem on the backjoon website. It takes in two integers n and m, and an array of size n. It then calculates the number of subarrays of the given array whose
This code is a test for the Problem1_4 class. It tests the Test_main() method of the Problem1_4 class. It creates an instance of the Problem1_4 class and passes in an array of strings and
이 코드는 백준 2559번 문제를 풀기 위한 코
이 코드는 스택을 구현하는 것입니다. 스택
This code is a solution to the Lv_1_ArrPlus problem, which is a problem that requires two 2D arrays to be added together. The code iterates through each row of the two arrays and adds the corresponding elements together,
이 코드는 블록의 갯수와 점프 칸의 갯수
이 코드는 스택을 사용하여 입력받은 수를 순
이 코드는 스택을 사용하여 입력받은 수를 더
This code tests the Tmax_no1 function.
This code takes a string as an input and returns a string with all the lowercase letters converted to uppercase and all the uppercase letters converted to lowercase.
This code does not do anything, as it is not a valid code.
이 코드는 2차원 배열과 이동할 위치를 나
This code takes two strings as input from the user and stores them in the variables input1 and input2. It then creates a HashMap and stores each character from input1 as a key in the map, with the value being the number
This code is a solution to the Coke Problem. The Coke Problem is a problem where a person has a certain number of coke bottles and wants to divide them into a certain number of groups. The code takes in three parameters: the number
This code does not do anything. It is an empty main method.
This code tests the main method of the Problem1_2 class. It checks if the method returns the string "study" when the string "STUDY" is passed as an argument.
This code is a solution to a problem that reverses a given array of strings. It takes an array of strings and an integer n as input, and returns an array of strings with each string reversed. The main method takes the input from
This code is a solution to the Lv1 Lotto BestWorst problem. It takes two arrays of integers, lottos and win_nums, and returns an array of two integers representing the best and worst possible outcomes for the
This code reads in a line of space-separated integers and finds the two numbers that have the smallest difference between them. It then prints out the two numbers.
이 코드는 그래프의 노드를 깊이 우선 탐
This code implements a Depth-First Search (DFS) algorithm to traverse a graph. It takes in a graph as input, and then uses a stack to traverse the graph in a depth-first manner. It also keeps track of which
이 코드는 배열의 합을 구하는 것입니다. 배
This code is a solution to a problem from the online judge site, Baekjoon. The problem is called "Gold 5430" and it involves manipulating a deque (double-ended queue) of integers. The code takes in
This code finds the longest string from an array of strings and returns it. It takes an array of strings as input and uses a for loop to compare the length of each string in the array. The longest string is then returned as the output
This code is intended to create a program that will take in a level, the number of blocks, and the last block colored as input and then output a list of all the possible rectangles that can be formed with the given blocks. It
This code is a solution to the Level 1 problem of the New ID Recommendation challenge. It takes a new_id string as an input and returns a modified version of the string that meets the requirements of the challenge. The code goes through
This code takes in an integer and a string as input. It then creates a HashMap with the characters in the string as keys and the number of occurrences of each character as values. It then finds the character with the highest number of occurrences
This code tests the main() method of the problem1_1 class. It creates an instance of the problem1_1 class and then calls the main() method with two parameters, a string and a character. It then asserts that the
This code tests the main method of the Problem1_3 class. It splits a given string into an array of strings and then passes it to the Test_main method of the Problem1_3 class. The Test_main method then
This code is a solution to a problem that counts the number of times a given character appears in a given string. It takes in two parameters, a string and a character, and returns the number of times the character appears in the string.
Code Review
-
Use meaningful variable names: Instead of using li, use a more meaningful name like lineInput.
-
Use proper indentation: Make sure to indent your code properly to make it easier to read.
-
Use comments: Add comments to your code to explain what it is doing and why.
-
Use whitespace: Add whitespace between lines of code to make it easier to read.
-
Use consistent formatting: Make sure to use consistent formatting throughout your code to make it easier to read.
You should use meaningful variable names. For example, in the AllMembers class, you have a variable called "mems" which is an array of User objects. It would be more meaningful to call it "users" or "members".
You should use more descriptive method names. For example, in the AllMembers class, you have a method called "reportAlgo" which is used to set the reported and my_report fields of each user. It would be more descriptive to call it "setReportedAndMyReport".
You should use more descriptive class names. For example, in the AllMembers class, you have a class called "
- You should use meaningful variable names.
- You should use meaningful function names.
- You should use meaningful class names.
- You should use meaningful comments.
- You should use proper indentation.
- You can use StringBuilder instead of StringBuffer.
- You can use StringBuilder.reverse() instead of StringBuffer.reverse().toString().
- You can use String.replaceAll() instead of for loop.
- You can use String.replace() instead of for loop.
- You can use String.replaceFirst() instead of for loop.
- Use meaningful variable names
- Use proper indentation
- Use proper spacing
- Use proper comments
- Use proper formatting
- Please use the same name for the class and the file.
- Please use the same name for the method and the class.
- Please use the same name for the variables and the method.
- Please use the same name for the parameters and the variables.
- Please use the same name for the constants and the variables.
-
Use a more descriptive name for the interface. For example, ComparableObjects or ComparableItems.
-
Add a generic type parameter to the interface. This will allow the interface to be used with any type of object.
-
Add a Javadoc comment to the interface to explain what it does and how it should be used.
-
Add a method to the interface that returns a boolean indicating whether two objects are equal.
-
Add a method to the interface that returns an integer indicating the relative order of two objects.
You should use meaningful variable names. For example, instead of using "giver_num" and "giver_amout" in the Transactions class, you should use "giverNumber" and "giverAmount".
You should use the same naming convention for all your variables. For example, you should use "userNumber" instead of "user_num" in the User class.
You should use the same naming convention for all your methods. For example, you should use "addStack" instead of "addStack" in the User class.
You should use the same naming convention
-
Use the correct naming conventions for your class. The class name should start with an uppercase letter.
-
Use the correct naming conventions for your variables. The variable name should start with a lowercase letter.
-
Add a constructor to your class to initialize the value of the variable.
-
Add a getter and setter method for the value of the variable.
-
Override the equals() and hashCode() methods to compare two objects of the same type.
- Use meaningful variable names
- Use proper indentation
- Use comments to explain the code
- Use proper spacing between operators and operands
- Use proper data types for variables
- Use meaningful variable names
- Use meaningful function names
- Use meaningful class names
- Use meaningful constants
- Use meaningful comments
- You should use assertArrayEquals instead of assertEquals when you are comparing two arrays.
- You should use meaningful variable names.
- You should use meaningful method names.
- You should use meaningful class names.
- You should use meaningful test names.
- Use meaningful variable names.
- Use the same type of brackets for if-else statements.
- Use spaces between operators and operands.
- Use comments to explain the code.
- Use consistent indentation.
- Use meaningful variable names
- Use meaningful method names
- Use meaningful class names
- Use meaningful constants
- Use meaningful comments
- Use meaningful variable names.
- Use proper indentation.
- Use comments to explain the code.
- Use proper data types for variables.
- Use proper error handling.
- You can use a for loop instead of a while loop in line 28.
- You can use a for loop instead of a while loop in line 33.
- You can use a for loop instead of a while loop in line 37.
- You can use a for loop instead of a while loop in line 41.
- You can use a for loop instead of a while loop in line 45.
public static void solution() throws IOException {
br = new BufferedReader(new InputStreamReader(System.in));
// 진행하려는 스택 수
int n = Integer.parseInt(br.readLine());
Stack stack = new Stack<>();
StringBuilder sb = new StringBuilder();
int cnt = 1;
boolean noFlag=false;
// 수가 1부터 시작
for (int i = 0; i < n; i
- Use meaningful variable names
- Use proper indentation
- Use proper spacing
- Use proper comments
- Use proper formatting
-
You should use assertEquals() instead of assertTrue() when you are comparing two values.
-
You should use meaningful variable names instead of using single letter variables.
-
You should use meaningful method names instead of using generic names like solution().
-
You should use meaningful test names instead of using generic names like solution().
-
You should use meaningful comments to explain the purpose of the code.
-
Use meaningful names for variables and methods.
-
Use proper indentation and spacing to make the code more readable.
-
Use comments to explain the code.
-
Use proper data types for variables.
-
Use proper error handling techniques.
- Use meaningful variable names:
Instead of using "ans" as a variable name, you can use something more meaningful like "result".
- Use descriptive comments:
You can add comments to explain what your code is doing. This will make it easier for other people to understand your code.
- Use consistent indentation:
Your code should be indented consistently. This will make it easier to read and understand.
- Use whitespace:
You can add whitespace between lines of code to make it easier to read.
- Use meaningful method names:
Instead of using "Solution" as a method name, you can use something more meaningful like
-
Use meaningful variable names: Instead of using generic variable names like "x" and "y", use meaningful names that describe the purpose of the variable.
-
Use consistent indentation: Make sure that all of your code is properly indented to make it easier to read and understand.
-
Avoid hard-coding values: Instead of hard-coding values into your code, use constants or variables to make it easier to change values in the future.
-
Use comments: Add comments to your code to explain what it is doing and why. This will make it easier for other developers to understand your code.
-
Use proper formatting: Make sure that your code is properly formatted and
- You can use StringBuilder instead of String for concatenation.
- You can use for-each loop instead of for loop.
- You can use switch-case instead of if-else.
- You can use ternary operator instead of if-else.
- You can use static import for System.out.println.
- Use meaningful variable names.
- Use the correct data type for the variables.
- Use proper indentation.
- Use comments to explain the code.
- Use proper formatting for the code.
- Use meaningful variable names:
Instead of using a, b, n, use meaningful variable names like coke, divide, ret_num, sums, drinked.
- Use proper indentation:
Your code should be properly indented to make it more readable.
- Use comments:
You should use comments to explain the logic of your code.
- Use proper spacing:
You should use proper spacing between operators and operands to make your code more readable.
- Use proper return statements:
You should use proper return statements to make your code more efficient.
- Use meaningful variable names.
- Use comments to explain the code.
- Use consistent indentation.
- Use white space to improve readability.
- Use proper formatting for code blocks.
- You should use camelCase for naming variables.
- You should use meaningful names for variables.
- You should use meaningful names for methods.
- You should use meaningful names for classes.
- You should use meaningful names for packages.
-
Please use the same name for the same variable.
-
Please use meaningful names for variables.
-
Please use the same name for the same method.
-
Please use meaningful names for methods.
-
Please use the same name for the same class.
- Use meaningful variable names:
Instead of using "ans" as a variable name, you can use something like "reversedStringArray".
- Use proper indentation:
Your code should be properly indented to make it more readable.
- Use comments:
You should use comments to explain the logic of your code.
- Use constants:
You should use constants instead of hard-coding values in your code.
- Use proper data types:
You should use the proper data type for the variables. For example, instead of using "String[]" for the input, you can use "List".
-
You should use assertThat instead of assertEquals.
-
You should use assertArrayEquals instead of assertEquals when comparing arrays.
-
You should use @beforeeach and @AfterEach annotations to set up and tear down the test environment.
-
You should use the @test annotation to mark your test methods.
-
You should use the @test annotation to mark your test methods.
public static boolean contains(final int[] arr, final int key) {
Arrays.sort(arr);
return Arrays.binarySearch(arr, key) >= 0;
}
You can use Arrays.asList(arr).contains(key) instead of Arrays.binarySearch(arr, key) >= 0;
public int[] ret_winnums(int[] lottos, int[] win_nums){
int win_cnt=0;
int zero_cnt=0;
int[] result = {0,0};
Arrays.sort(win_
-
Use meaningful variable names.
-
Use consistent indentation and spacing.
-
Avoid using global variables.
-
Use descriptive comments to explain the code.
-
Use proper error handling.
- You can use a for-each loop instead of a for loop.
- You can use a StringBuilder instead of a String for better performance.
- You can use a List instead of an array for better flexibility.
- You can use a HashMap instead of an array for better performance.
- You can use a TreeMap instead of an array for better performance.
- Use meaningful variable names:
Instead of using vistied, use visited.
- Use consistent indentation:
Your code should be indented consistently.
- Use comments to explain your code:
You should use comments to explain what your code is doing.
- Use spaces to improve readability:
You should use spaces to improve the readability of your code.
- Use consistent naming conventions:
You should use consistent naming conventions for your variables and functions.
- Use meaningful variable names.
- Use consistent indentation.
- Use comments to explain your code.
- Use descriptive method names.
- Use proper formatting for your code.
- You should use a for loop instead of a while loop.
- You should use a switch statement instead of an if-else statement.
- You should use a ternary operator instead of an if-else statement.
- You should use a for-each loop instead of a for loop.
- You should use a break statement instead of a continue statement.
- You can use a stack instead of a deque.
- You can use a for-each loop instead of a for loop.
- You can use a StringBuilder instead of a String for building the output string.
- You can use a switch statement instead of an if-else statement.
- You can use a ternary operator instead of an if-else statement.
- Use meaningful variable names:
Instead of using "ans" as a variable name, you can use something like "longestString".
- Use proper indentation:
Your code should be properly indented to make it easier to read and understand.
- Use comments:
You should use comments to explain what your code is doing. This will make it easier for other people to understand your code.
- Use proper formatting:
Your code should be properly formatted to make it easier to read and understand.
- Use descriptive names for methods:
Instead of using "Solution" as a method name, you can use something like "FindLongestString
-
Use meaningful variable names. For example, instead of using num_colored, use something like blockColor.
-
Use meaningful class names. For example, instead of using rectangle, use something like Block.
-
Use meaningful method names. For example, instead of using main, use something like solve.
-
Use meaningful constants. For example, instead of using block_num, use something like BLOCK_NUMBER.
-
Use meaningful comments. For example, instead of using //, use something like // This method is used to solve the problem.
- You should use assertEquals instead of assertArrayEquals.
- You should use assertTrue instead of assertArrayEquals.
- You should use assertFalse instead of assertArrayEquals.
- You should use assertNotNull instead of assertArrayEquals.
- You should use assertNull instead of assertArrayEquals.
- You can use StringBuilder instead of String for better performance.
- You can use a HashSet instead of List for better performance.
- You can use a for-each loop instead of a for loop for better readability.
- You can use a switch statement instead of if-else for better readability.
- You can use a ternary operator instead of if-else for better readability.
- Use meaningful variable names.
- Use meaningful method names.
- Use meaningful class names.
- Use meaningful comments.
- Use proper indentation.
-
You should use the @before annotation to set up the test data before running the test.
-
You should use the @after annotation to clean up the test data after running the test.
-
You should use the @test annotation to indicate that the method is a test method.
-
You should use the assertEquals() method to compare the expected and actual results.
-
You should use the @ignore annotation to ignore the test if it is not ready yet.
-
Use meaningful variable names
-
Use descriptive comments to explain the code
-
Use consistent indentation
-
Avoid unnecessary code
-
Use proper formatting for code
-
You should use camelCase for your variable names.
-
You should use meaningful names for your variables.
-
You should use meaningful names for your methods.
-
You should use meaningful names for your classes.
-
You should use meaningful comments to explain your code.
-
You should use camelCase for naming variables.
-
You should use meaningful names for variables.
-
You should use the same type of variable for the same purpose.
-
You should use the same type of variable for the same purpose.
-
You should use the same type of variable for the same purpose.
Code Summary
filename : /src/main/Lv1_three_mstier_problem_brutal.java?ref=master
This code is a solution to the Lv1 three mstier problem, which is a problem that involves finding the most efficient way to solve a given problem. The code defines a class Solution which contains a method ret_star that takes a
filename : /src/main/Lv1_kakaoblind_report.java?ref=master
This code is a solution to the Kakao Blind Recruitment Level 1 problem. It takes in two arrays, one containing the list of user IDs and the other containing the reports of users, and an integer k. It then returns an
filename : /src/main/Tmax_no1.java?ref=master
This code is a solution to the Tmax No.1 problem. It takes in two arrays, one containing the preferences of each participant and the other containing the amount of coffee they have. It then sorts both arrays and calculates the difference between
filename : /src/inflearn_java/Stack_2.java?ref=master
이 코드는 주어진 문자열에서 괄호를 제
filename : /src/main/Lv1_yenyangPlus.java?ref=master
This code is a solution to the Lv1_yenyangPlus problem. It takes in an array of integers (absolutes) and an array of booleans (signs) and returns the sum of the numbers in the
filename : /src/test/main/Lv1_Lotto_BestWorstTest.java?ref=master
filename : /src/dataStructureStudy/Comparable.java?ref=master
This code defines an interface called Comparable that takes a generic type parameter T. The interface contains a single method, compareTo, which takes an object of type T as a parameter and returns an integer. This method can be used to compare
filename : /src/main/Tmax_no2.java?ref=master
This code is a solution to the Tmax No2 problem. It is a program that calculates the final balance of each user after a series of transactions. The program takes in an array of balances, a 2D array of transactions, and
filename : /src/dataStructureStudy/CustumInteger.java?ref=master
This code creates a custom Integer class that implements the Comparable interface. The compareTo() method is overridden to compare two Integer objects and return an integer value indicating their relative order.
filename : /src/inflearn_java/Stack_1.java?ref=master
This code is a solution to a problem involving stacks. It takes a string as input and checks if the parentheses in the string are balanced. If the parentheses are balanced, it returns "YES", otherwise it returns "NO".
filename : /src/backjoon_Java/Gold_10986.java?ref=master
This code is a solution to the Gold 10986 problem on the backjoon website. It takes in two integers n and m, and an array of size n. It then calculates the number of subarrays of the given array whose
filename : /src/inflearn_java_test/inflearn_java/Problem1_4Test.java?ref=master
This code is a test for the Problem1_4 class. It tests the Test_main() method of the Problem1_4 class. It creates an instance of the Problem1_4 class and passes in an array of strings and
filename : /src/backjoon_Java/Silver_2559.java?ref=master
이 코드는 백준 2559번 문제를 풀기 위한 코
filename : /src/backjoon_Java/Silver_10828.java?ref=master
이 코드는 스택을 구현하는 것입니다. 스택
filename : /src/main/Lv_1_ArrPlus.java?ref=master
This code is a solution to the Lv_1_ArrPlus problem, which is a problem that requires two 2D arrays to be added together. The code iterates through each row of the two arrays and adds the corresponding elements together,
filename : /src/main/Softeer_pro3.java?ref=master
이 코드는 블록의 갯수와 점프 칸의 갯수
filename : /src/backjoon_Java/Silver_1874.java?ref=master
이 코드는 스택을 사용하여 입력받은 수를 순
filename : /src/backjoon_Java/Silver_10773.java?ref=master
이 코드는 스택을 사용하여 입력받은 수를 더
filename : /src/test/main/Lv1_newIdRecommendTest.java?ref=master
filename : /src/test/main/Tmax_no1Test.java?ref=master
This code tests the Tmax_no1 function.
filename : /src/inflearn_java/Problem1_2.java?ref=master
This code takes a string as an input and returns a string with all the lowercase letters converted to uppercase and all the uppercase letters converted to lowercase.
filename : /src/inflearn_java/Problem1_5.java?ref=master
This code does not do anything, as it is not a valid code.
filename : /src/inflearn_java/Stack_3.java?ref=master
이 코드는 2차원 배열과 이동할 위치를 나
filename : /src/inflearn_java/Hash_2.java?ref=master
This code takes two strings as input from the user and stores them in the variables input1 and input2. It then creates a HashMap and stores each character from input1 as a key in the map, with the value being the number
filename : /src/main/Lv1_coke_problem.java?ref=master
This code is a solution to the Coke Problem. The Coke Problem is a problem where a person has a certain number of coke bottles and wants to divide them into a certain number of groups. The code takes in three parameters: the number
filename : /src/main/Main.java?ref=master
This code does not do anything. It is an empty main method.
filename : /src/inflearn_java_test/inflearn_java/Problem1_2Test.java?ref=master
This code tests the main method of the Problem1_2 class. It checks if the method returns the string "study" when the string "STUDY" is passed as an argument.
filename : /src/test/main/Lv1_yenyangPlusTest.java?ref=master
filename : /src/inflearn_java/Problem1_4.java?ref=master
This code is a solution to a problem that reverses a given array of strings. It takes an array of strings and an integer n as input, and returns an array of strings with each string reversed. The main method takes the input from
filename : /src/test/backjoon_Java/Silver_10828Test.java?ref=master
filename : /src/main/Lv1_Lotto_BestWorst.java?ref=master
This code is a solution to the Lv1 Lotto BestWorst problem. It takes two arrays of integers, lottos and win_nums, and returns an array of two integers representing the best and worst possible outcomes for the
filename : /src/test/backjoon_Java/Gold_5430Test.java?ref=master
filename : /src/main/Softeer06.java?ref=master
This code reads in a line of space-separated integers and finds the two numbers that have the smallest difference between them. It then prints out the two numbers.
filename : /src/dataStructureStudy/Dfs.java?ref=master
이 코드는 그래프의 노드를 깊이 우선 탐
filename : /src/backjoon_Java/dfs/Silver_24479.java?ref=master
This code implements a Depth-First Search (DFS) algorithm to traverse a graph. It takes in a graph as input, and then uses a stack to traverse the graph in a depth-first manner. It also keeps track of which
filename : /src/backjoon_Java/Silver_11659.java?ref=master
이 코드는 배열의 합을 구하는 것입니다. 배
filename : /src/backjoon_Java/Gold_5430.java?ref=master
This code is a solution to a problem from the online judge site, Baekjoon. The problem is called "Gold 5430" and it involves manipulating a deque (double-ended queue) of integers. The code takes in
filename : /src/inflearn_java/Problem1_3.java?ref=master
This code finds the longest string from an array of strings and returns it. It takes an array of strings as input and uses a for loop to compare the length of each string in the array. The longest string is then returned as the output
filename : /src/main/SofteerBootTest.java?ref=master
This code is intended to create a program that will take in a level, the number of blocks, and the last block colored as input and then output a list of all the possible rectangles that can be formed with the given blocks. It
filename : /src/test/main/Tmax_no2Test.java?ref=master
filename : /src/main/Lv1_newIdRecommend.java?ref=master
This code is a solution to the Level 1 problem of the New ID Recommendation challenge. It takes a new_id string as an input and returns a modified version of the string that meets the requirements of the challenge. The code goes through
filename : /src/inflearn_java/Hash_1.java?ref=master
This code takes in an integer and a string as input. It then creates a HashMap with the characters in the string as keys and the number of occurrences of each character as values. It then finds the character with the highest number of occurrences
filename : /src/inflearn_java_test/inflearn_java/problem1_1Test.java?ref=master
This code tests the main() method of the problem1_1 class. It creates an instance of the problem1_1 class and then calls the main() method with two parameters, a string and a character. It then asserts that the
filename : /src/test/main/Lv1_kakaoblind_reportTest.java?ref=master
filename : /src/inflearn_java_test/inflearn_java/Problem1_3Test.java?ref=master
This code tests the main method of the Problem1_3 class. It splits a given string into an array of strings and then passes it to the Test_main method of the Problem1_3 class. The Test_main method then
filename : /src/inflearn_java/problem1_1.java?ref=master
This code is a solution to a problem that counts the number of times a given character appears in a given string. It takes in two parameters, a string and a character, and returns the number of times the character appears in the string.
Code Review
filename : /src/main/Lv1_three_mstier_problem_brutal.java?ref=master
Use meaningful variable names: Instead of using li, use a more meaningful name like lineInput.
Use proper indentation: Make sure to indent your code properly to make it easier to read.
Use comments: Add comments to your code to explain what it is doing and why.
Use whitespace: Add whitespace between lines of code to make it easier to read.
Use consistent formatting: Make sure to use consistent formatting throughout your code to make it easier to read.
filename : /src/main/Lv1_kakaoblind_report.java?ref=master
You should use meaningful variable names. For example, in the AllMembers class, you have a variable called "mems" which is an array of User objects. It would be more meaningful to call it "users" or "members".
You should use more descriptive method names. For example, in the AllMembers class, you have a method called "reportAlgo" which is used to set the reported and my_report fields of each user. It would be more descriptive to call it "setReportedAndMyReport".
You should use more descriptive class names. For example, in the AllMembers class, you have a class called "
filename : /src/main/Tmax_no1.java?ref=master
filename : /src/inflearn_java/Stack_2.java?ref=master
filename : /src/main/Lv1_yenyangPlus.java?ref=master
filename : /src/test/main/Lv1_Lotto_BestWorstTest.java?ref=master
filename : /src/dataStructureStudy/Comparable.java?ref=master
Use a more descriptive name for the interface. For example, ComparableObjects or ComparableItems.
Add a generic type parameter to the interface. This will allow the interface to be used with any type of object.
Add a Javadoc comment to the interface to explain what it does and how it should be used.
Add a method to the interface that returns a boolean indicating whether two objects are equal.
Add a method to the interface that returns an integer indicating the relative order of two objects.
filename : /src/main/Tmax_no2.java?ref=master
You should use meaningful variable names. For example, instead of using "giver_num" and "giver_amout" in the Transactions class, you should use "giverNumber" and "giverAmount".
You should use the same naming convention for all your variables. For example, you should use "userNumber" instead of "user_num" in the User class.
You should use the same naming convention for all your methods. For example, you should use "addStack" instead of "addStack" in the User class.
You should use the same naming convention
filename : /src/dataStructureStudy/CustumInteger.java?ref=master
Use the correct naming conventions for your class. The class name should start with an uppercase letter.
Use the correct naming conventions for your variables. The variable name should start with a lowercase letter.
Add a constructor to your class to initialize the value of the variable.
Add a getter and setter method for the value of the variable.
Override the equals() and hashCode() methods to compare two objects of the same type.
filename : /src/inflearn_java/Stack_1.java?ref=master
filename : /src/backjoon_Java/Gold_10986.java?ref=master
filename : /src/inflearn_java_test/inflearn_java/Problem1_4Test.java?ref=master
filename : /src/backjoon_Java/Silver_2559.java?ref=master
filename : /src/backjoon_Java/Silver_10828.java?ref=master
filename : /src/main/Lv_1_ArrPlus.java?ref=master
filename : /src/main/Softeer_pro3.java?ref=master
filename : /src/backjoon_Java/Silver_1874.java?ref=master
public static void solution() throws IOException {
br = new BufferedReader(new InputStreamReader(System.in));
// 진행하려는 스택 수
int n = Integer.parseInt(br.readLine());
Stack stack = new Stack<>();
StringBuilder sb = new StringBuilder();
int cnt = 1;
boolean noFlag=false;
// 수가 1부터 시작
for (int i = 0; i < n; i
filename : /src/backjoon_Java/Silver_10773.java?ref=master
filename : /src/test/main/Lv1_newIdRecommendTest.java?ref=master
You should use assertEquals() instead of assertTrue() when you are comparing two values.
You should use meaningful variable names instead of using single letter variables.
You should use meaningful method names instead of using generic names like solution().
You should use meaningful test names instead of using generic names like solution().
You should use meaningful comments to explain the purpose of the code.
filename : /src/test/main/Tmax_no1Test.java?ref=master
Use meaningful names for variables and methods.
Use proper indentation and spacing to make the code more readable.
Use comments to explain the code.
Use proper data types for variables.
Use proper error handling techniques.
filename : /src/inflearn_java/Problem1_2.java?ref=master
Instead of using "ans" as a variable name, you can use something more meaningful like "result".
You can add comments to explain what your code is doing. This will make it easier for other people to understand your code.
Your code should be indented consistently. This will make it easier to read and understand.
You can add whitespace between lines of code to make it easier to read.
Instead of using "Solution" as a method name, you can use something more meaningful like
filename : /src/inflearn_java/Problem1_5.java?ref=master
Use meaningful variable names: Instead of using generic variable names like "x" and "y", use meaningful names that describe the purpose of the variable.
Use consistent indentation: Make sure that all of your code is properly indented to make it easier to read and understand.
Avoid hard-coding values: Instead of hard-coding values into your code, use constants or variables to make it easier to change values in the future.
Use comments: Add comments to your code to explain what it is doing and why. This will make it easier for other developers to understand your code.
Use proper formatting: Make sure that your code is properly formatted and
filename : /src/inflearn_java/Stack_3.java?ref=master
filename : /src/inflearn_java/Hash_2.java?ref=master
filename : /src/main/Lv1_coke_problem.java?ref=master
Instead of using a, b, n, use meaningful variable names like coke, divide, ret_num, sums, drinked.
Your code should be properly indented to make it more readable.
You should use comments to explain the logic of your code.
You should use proper spacing between operators and operands to make your code more readable.
You should use proper return statements to make your code more efficient.
filename : /src/main/Main.java?ref=master
filename : /src/inflearn_java_test/inflearn_java/Problem1_2Test.java?ref=master
filename : /src/test/main/Lv1_yenyangPlusTest.java?ref=master
Please use the same name for the same variable.
Please use meaningful names for variables.
Please use the same name for the same method.
Please use meaningful names for methods.
Please use the same name for the same class.
filename : /src/inflearn_java/Problem1_4.java?ref=master
Instead of using "ans" as a variable name, you can use something like "reversedStringArray".
Your code should be properly indented to make it more readable.
You should use comments to explain the logic of your code.
You should use constants instead of hard-coding values in your code.
You should use the proper data type for the variables. For example, instead of using "String[]" for the input, you can use "List".
filename : /src/test/backjoon_Java/Silver_10828Test.java?ref=master
You should use assertThat instead of assertEquals.
You should use assertArrayEquals instead of assertEquals when comparing arrays.
You should use @beforeeach and @AfterEach annotations to set up and tear down the test environment.
You should use the @test annotation to mark your test methods.
You should use the @test annotation to mark your test methods.
filename : /src/main/Lv1_Lotto_BestWorst.java?ref=master
public static boolean contains(final int[] arr, final int key) {
Arrays.sort(arr);
return Arrays.binarySearch(arr, key) >= 0;
}
You can use Arrays.asList(arr).contains(key) instead of Arrays.binarySearch(arr, key) >= 0;
public int[] ret_winnums(int[] lottos, int[] win_nums){
int win_cnt=0;
int zero_cnt=0;
int[] result = {0,0};
Arrays.sort(win_
filename : /src/test/backjoon_Java/Gold_5430Test.java?ref=master
Use meaningful variable names.
Use consistent indentation and spacing.
Avoid using global variables.
Use descriptive comments to explain the code.
Use proper error handling.
filename : /src/main/Softeer06.java?ref=master
filename : /src/dataStructureStudy/Dfs.java?ref=master
Instead of using vistied, use visited.
Your code should be indented consistently.
You should use comments to explain what your code is doing.
You should use spaces to improve the readability of your code.
You should use consistent naming conventions for your variables and functions.
filename : /src/backjoon_Java/dfs/Silver_24479.java?ref=master
filename : /src/backjoon_Java/Silver_11659.java?ref=master
filename : /src/backjoon_Java/Gold_5430.java?ref=master
filename : /src/inflearn_java/Problem1_3.java?ref=master
Instead of using "ans" as a variable name, you can use something like "longestString".
Your code should be properly indented to make it easier to read and understand.
You should use comments to explain what your code is doing. This will make it easier for other people to understand your code.
Your code should be properly formatted to make it easier to read and understand.
Instead of using "Solution" as a method name, you can use something like "FindLongestString
filename : /src/main/SofteerBootTest.java?ref=master
Use meaningful variable names. For example, instead of using num_colored, use something like blockColor.
Use meaningful class names. For example, instead of using rectangle, use something like Block.
Use meaningful method names. For example, instead of using main, use something like solve.
Use meaningful constants. For example, instead of using block_num, use something like BLOCK_NUMBER.
Use meaningful comments. For example, instead of using //, use something like // This method is used to solve the problem.
filename : /src/test/main/Tmax_no2Test.java?ref=master
filename : /src/main/Lv1_newIdRecommend.java?ref=master
filename : /src/inflearn_java/Hash_1.java?ref=master
filename : /src/inflearn_java_test/inflearn_java/problem1_1Test.java?ref=master
You should use the @before annotation to set up the test data before running the test.
You should use the @after annotation to clean up the test data after running the test.
You should use the @test annotation to indicate that the method is a test method.
You should use the assertEquals() method to compare the expected and actual results.
You should use the @ignore annotation to ignore the test if it is not ready yet.
filename : /src/test/main/Lv1_kakaoblind_reportTest.java?ref=master
Use meaningful variable names
Use descriptive comments to explain the code
Use consistent indentation
Avoid unnecessary code
Use proper formatting for code
filename : /src/inflearn_java_test/inflearn_java/Problem1_3Test.java?ref=master
You should use camelCase for your variable names.
You should use meaningful names for your variables.
You should use meaningful names for your methods.
You should use meaningful names for your classes.
You should use meaningful comments to explain your code.
filename : /src/inflearn_java/problem1_1.java?ref=master
You should use camelCase for naming variables.
You should use meaningful names for variables.
You should use the same type of variable for the same purpose.
You should use the same type of variable for the same purpose.
You should use the same type of variable for the same purpose.