168 questions
Hello! I am personally studying algorithms and data structures through studiesFor list, such as single linked list, double linked list, etc. I can understand why it is implemented differently even tho...
Hello! It's a simple question. Hmm... I don't know what to do with the algorithmI'm trying to get two strings from the user and check if they're the sameFor example, even if the string is flipped, the...
Currently, we are trying to draw a polygon with javascript through the following map api and find the center point of that polygon.I've done drawing a polygon.I'm struggling to find the center point o...
The execution environment uses the GCC compiler through Bash.We're going to create a program to find the distance between two of the 16 points that are closest to each other.#include <stdio.h>#i...
import java.util.Scanner;public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); in.close(); int sum = 0, max = 0; while (n >...
A / | \ B | D -- E \ | / | C ------+If you have a graph implemented as a linked list, you must call the DFS function n times to visit n vertices, and each call must move between nodes in the lin...
Hello, I'm asking you a question because I didn't like my code while doing my assignment.The questions you gave me are as follows.Develop a JAVA-program that does the following job: Your program shall...
import java.util.*;public class Solution { public int[] solution(int []arr) { int[] ans = new int[100]; int cur=arr[0]; int j=0; for(int i=1;i<arr.length;i++){ if(cur!=arr[i]){ ans[j]=cur; ...
The problem I'm solving right now is Exporter Tour in Baekjun Online Jersey #2098. I know that the most common way to solve this problem is through bitmask and dynamic programming. I planned it like t...
https://www.hackerrank.com/challenges/java-output-formatting/problemThe problem link is above.import java.util.Scanner;public class Solution { public static void main(String[] args) { Scanner sc=new ...
« | - 13 - | » |
© 2024 OneMinuteCode. All rights reserved.