Skip to content

Instantly share code, notes, and snippets.

View nghitruongdev's full-sized avatar
🎯
Focusing Spring Boot

nghitruong nghitruongdev

🎯
Focusing Spring Boot
  • 23:12 (UTC +07:00)
View GitHub Profile
@nghitruongdev
nghitruongdev / TotalCopy.java
Last active September 3, 2021 12:54
Calculate the sum of the times any individual element will be copied
package dynamicarray;
import java.util.Scanner;
// Assume that for a dynamic array of size 2 and capacity 4 we perform the following sequence of operations:
// add 5
// add 7
// add 9
// insert 3 1
// insert 6 2
// Here, add x means that we append an element to the array, insert x i means that we insert x to the array at the i-th index (assuming zero-based indexing).
@nghitruongdev
nghitruongdev / CoffeeMachine.java
Created August 25, 2021 01:53
Hyperskill Project - Easy
package machine;
public class CoffeeMachine {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}