Skip to content

Instantly share code, notes, and snippets.

View sikinmettugi's full-sized avatar

Chang-Jae Lee sikinmettugi

View GitHub Profile
@sikinmettugi
sikinmettugi / ProductExceptSelf.cs
Created July 25, 2017 06:22
Generate Product Except Self % m(== f), add all of them, then % m(== g), return g
int productExceptSelf(int[] nums, int m) {
var query = from i in Enumerable.Repeat(1, nums.Length)
select (Int64)i;
Int64[] prefixProducts = query.ToArray();
Int64[] postfixProducts = query.ToArray();
// Generate f
for (int i = 1; i < nums.Length; i++)
{
prefixProducts[i] = nums[i - 1] * prefixProducts[i - 1];
@sikinmettugi
sikinmettugi / Hello.java
Created May 30, 2017 15:10
Sample Java code
public class Hello {
public static void Main(String[] args)
{
System.out.Println("Hello world!");
}
}

Keybase proof

I hereby claim:

  • I am sikinmettugi on github.
  • I am locustspectre (https://keybase.io/locustspectre) on keybase.
  • I have a public key whose fingerprint is 7058 23A6 62AF 32FB 5115 BF65 D72C 58C1 7933 5897

To claim this, I am signing this object: