I'd like to run a programmer's answer on IntelJ

Asked 1 years ago, Updated 1 years ago, 365 views

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

2023-05-03 07:47

1 Answers

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 Travel route!

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!


2023-05-04 03:02

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.