Skip to content

Instantly share code, notes, and snippets.

Avatar

harshit rastogi hr1383

  • San francisco
View GitHub Profile
View widgets.json
{
"_id": {
"$oid": "5a3eae93734d1d12b6754044"
},
"business": "kree photography",
"website": "http://www.kreephotography.com/",
"widgets": [{
"yelp": {
"url": "https://www.yelp.com/biz/kree-photography-pleasanton-3",
"average_review": "4.3",
View test.cpp
change this
for (count; count < arraySize-1; count++) {
for (secondCounter = count + 1; secondCounter < arraySize; secondCounter++) {
if (rec[count].salary > rec[secondCounter].salary) {
temp = rec[count].salary;
rec[count].salary = rec[secondCounter].salary;
rec[secondCounter].salary = temp;
}
}
}
View test.cpp
void payrollProcess(double & hoursWorked, double & hourlyWage, double & grossPay, double & FITW_Exemptions, double & ficaTaxAmt, int & exemptionsQty, char & maritalStatus, double & totalExemptions) {
int maxHours = 40;
double overtimeHours = 0, adjustedIncome = 0;
bool error = false;
// calculating overtime hours
if (hoursWorked > maxHours) {
overtimeHours = hoursWorked - maxHours;
}
@hr1383
hr1383 / algo_recursive_sent.java
Created Apr 20, 2015
Given a list of word lists How to print all sentences possible taking one word from a list at a time via recursion
View algo_recursive_sent.java
// Given a list of word lists How to print all sentences possible taking one word from a list at a time via recursion
// http://www.geeksforgeeks.org/recursively-print-all-sentences-that-can-be-formed-from-list-of-word-lists/
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class RecursiveList {
public static void main(String[] args) {
List<String> l1 = Arrays.asList(new String[]{"you","are"});
@hr1383
hr1383 / algo_transformword.rb
Last active Aug 29, 2015
transform on word to other with intermediate words in dictionary, with min steps
View algo_transformword.rb
# Given a source word, target word and an English dictionary, transform the source word to target by
# changing/adding/removing 1 character at a time, while all intermediate words being valid English words.
# Return the transformation chain which has the smallest number of intermediate words.
# - See more at: http://www.ardendertat.com/2011/10/17/programming-interview-questions-8-transform-word/
#this is pseudo code, untested
dict = Hash.new
build_dict(dict_arr)
@hr1383
hr1383 / README.md
Last active Aug 29, 2015
Connecting the dots among companies invested by different VC's using D3.js
View README.md

Grabbed the data of leading VC's in silicon valley using Crunchbase API.

The VC's data collected :

  1. Accel Partners
  2. Andersson Horowitz 3)General Catalyst 4)Greylock
  3. Klien Partners
You can’t perform that action at this time.