Skip to content

Instantly share code, notes, and snippets.

View lifeamit's full-sized avatar

Amit Agarwal lifeamit

View GitHub Profile
@lifeamit
lifeamit / find_anagrams.js
Created April 6, 2017 02:13
Program to group anagrams from a given string array
function groupAnagrams(strArr) {
var newArr = strArr.slice(0); // To avoid changes in original array
var size = newArr.length,
output = [],
i = 0,
tmp, str1, str2;
while (size) {
str1 = newArr[0];
size = removeElement(newArr, 0, size);
{
"slides": [
{
"id": 1,
"fields": [
{
"id": 35,
"options": [
22,
24
@lifeamit
lifeamit / ratings.json
Created November 25, 2015 05:51
Ratings response
{
"response": [
{
"rating": 0,
"source": null,
"reviewMonth": null,
"createdInThisMonth": 0,
"count": 0,
"milestone": "Valencia, CA",
"businessId": 51892,
@lifeamit
lifeamit / gist:5a7e84fb321cfda5be96
Last active October 25, 2015 05:44
reseller api response POST and GET responses
POST REQUEST
POST / http://demo.birdeye.com/papi/business/19653/pricingtier
{"discountType":"tier",
"minSubscriptionQuantity": 1,
"messages":[
{"startQty":1, "endQty":5, "pricePerUnit":100},
{"startQty":6, "endQty":10, "pricePerUnit":100},
{"startQty":11, "endQty":50, "pricePerUnit":80},