Skip to content

Instantly share code, notes, and snippets.

View Githugutech's full-sized avatar
🤞
A life long learner who aspires for mastery of his craft and a team player

Githugu Pius Githugutech

🤞
A life long learner who aspires for mastery of his craft and a team player
View GitHub Profile
@cupOJoseph
cupOJoseph / Seed_Phrase_Word_List.md
Created June 1, 2020 19:20
List of words allowed in the seed phrase for bitcoin and ethereum private keys

abandon ability able about above absent absorb abstract absurd abuse

@yitonghe00
yitonghe00 / 1099. Two Sum Less Than K (#1 Sort + Two pointer).java
Created November 17, 2019 23:34
1099. Two Sum Less Than K (https://leetcode.com/problems/two-sum-less-than-k/): Given an array A of integers and integer K, return the maximum S such that there exists i < j with A[i] + A[j] = S and S < K. If no i, j exist satisfying this equation, return -1.
// Sort + Two pointer solution
// Time: O(nlogn), 1ms
// Space: O(1), 36.7mb
class Solution {
public int twoSumLessThanK(int[] A, int K) {
// Sort the array first
Arrays.sort(A);
// Put pointers at begin/end and shrink
int l = 0, r = A.length - 1;