Skip to content

Instantly share code, notes, and snippets.

View danivijay's full-sized avatar
💙
https://twitter.com/utmostdev

Dani Vijay danivijay

💙
https://twitter.com/utmostdev
View GitHub Profile
package com.google.challenges;
public class Answer {
public static int locate(int head, int target, int under) {
under /= 2;
int right = head - 1; // right = head - 1
int left = head - 1 - under--; // left = head - 1 - under/2
if (right == target || left == target)
package com.google.challenges;
public class Answer {
public static int answer(int[] l) {
// Your code goes here.
}
}