I hereby claim:
- I am akshaynagpal on github.
- I am akshaynagpal (https://keybase.io/akshaynagpal) on keybase.
- I have a public key ASBg4Y73DXZzaar-dqVmvb1YmueY1nutmKSNBZWxJJq3eQo
To claim this, I am signing this object:
class TrieNode: | |
def __init__(self): | |
self.children = {} | |
self.isEndOfWord = False | |
class Trie: | |
def __init__(self): | |
self.root = TrieNode() | |
def insertWord(self, word): |
I hereby claim:
To claim this, I am signing this object:
/* | |
Author: Akshay Nagpal (github.com/akshaynagpal) | |
License: MIT | |
*/ | |
$(document).ready(function(){ | |
// clicking button with class "category-button" | |
$(".category-button").click(function(){ | |
// get the data-filter value of the button | |
var filterValue = $(this).attr('data-filter'); |
public static int clearBitsIthrough0(int num,int i){ | |
System.out.println("clearing bits "+i+" to 0 of number:"+Integer.toBinaryString(num)); | |
int mask = ~(0<<31); // mask with all bits set | |
mask = mask<<i+1; // mask with bits 0 to i cleared | |
System.out.println("using mask:"+Integer.toBinaryString(mask)); | |
return num & mask; | |
} |
package src.LinkedList; | |
public class LinkedList { | |
public Node head; | |
public int listCount; | |
public LinkedList(){ | |
head = new Node(0); | |
listCount = 0; | |
} |
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<script src='//ramnathv.github.io/rCharts/libraries/widgets/polycharts/js/polychart2.standalone.js' type='text/javascript'></script> | |
<style> | |
.rChart { | |
display: block; |
import PIL | |
from PIL import Image | |
""" | |
#resizing the image to 32 X 32 pixels | |
img = Image.open('one.png') | |
img = img.resize((32,32),PIL.Image.ANTIALIAS) | |
img.save('one_2.png') | |
""" |
def reverse(test): | |
n = len(test) | |
x="" | |
for i in range(n-1,-1,-1): | |
x += test[i] | |
return x | |
/* | |
* The StackDemo program gives user defined menu to carry different stack operations. | |
* | |
* @author Akshay Nagpal - https://www.twitter.com/akshay2626 | |
* @since 2014-08-18 | |
* @param x -Element inputted by the user. | |
* @param choice -Number chosen by the user from the menu according to which the appropriate operation is carried out. | |
*/ | |
import java.util.*; |