I solved it using solution function in programmers and I want to try running it in intelligentj, but the main is the basic function, so I'm wondering how we can apply each other and run the parameters.
parameter
My main language is not Java, so it's a very inefficient way, but... But sometimes when I solve problems in Java, the method I use is to put two files in the same directory and write them down as follows
For your information, the problem is
Main.java
public class Main {
public static void main(String[] args) {
Solution s = new Solution();
String[][] tickets = {{"ICN", "JFK"}, {"HND", "IAD"}, {"JFK", "HND"}};
// // String[][] tickets = {{"ICN", "SFO"}, {"ICN", "ATL"}, {"SFO", "ATL"}, {"ATL", "ICN"}, {"ATL","SFO"}};
String[] ans = s.solution(tickets);
for (String a: ans){
System.out.println(a);
}
}
}
Solution.java
import java.util.*;
class Solution {
public int[] solution(String[] operations) {
int[] answer = {};
return answer;
}
}
Here's why it's so inefficient, even though it's this way.
I don't like it either, but... But you can still use it on Intelligent J!!
After using it like this, practice without an IDE like Intelligent J!! There are a lot of cotages that don't allow external IDE...
Anyway, I hope it helped you!
910 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
608 GDB gets version error when attempting to debug with the Presense SDK (IDE)
571 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
616 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.