Skip to content

Instantly share code, notes, and snippets.

@kingsamadesu
Created December 3, 2020 20:26
Show Gist options
  • Save kingsamadesu/34d8537379ebdff45c12e1afefa2e410 to your computer and use it in GitHub Desktop.
Save kingsamadesu/34d8537379ebdff45c12e1afefa2e410 to your computer and use it in GitHub Desktop.
1551. Minimum Operations to Make Array Equal (leetcode.com).
/*
Your runtime beats 100.00 % of java submissions.
Your memory usage beats 99.18 % of java submissions.
*/
class Solution {
public int minOperations(int n) {
return n*n/4;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment