Skip to content

Instantly share code, notes, and snippets.

View debajitdeb11's full-sized avatar

DEBAJIT DEB debajitdeb11

View GitHub Profile
@debajitdeb11
debajitdeb11 / FindMajority.java
Created August 16, 2021 20:21
Given an integer array of size n, Find the elements occurs more than floor of n/3 times (Google Interview Question)
class FindMajority {
// Returns a list of majority elements
public List<Integer> majorityElement(int[] nums) {
int candidate1 = -1, candidate2 = -1;
int count1 = 0, count2 = 0;
for (int e : nums) {
if (e == candidate1)
### Keybase proof
I hereby claim:
* I am debajitdeb11 on github.
* I am debajitdeb21 (https://keybase.io/debajitdeb21) on keybase.
* I have a public key ASA93dD-hKsmAP1wifH1jSL8oT-hWYKwdfs1O8KkNSSvbwo
To claim this, I am signing this object:
@debajitdeb11
debajitdeb11 / GitConfigHttpProxy.md
Created February 8, 2020 17:01 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@debajitdeb11
debajitdeb11 / hyper.js
Created October 19, 2019 05:28 — forked from coco-napky/hyper.js
Hyper config for git bash in Windows
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',