Skip to content

Instantly share code, notes, and snippets.

View dheerajrav's full-sized avatar

Dheeraj Ravindranath dheerajrav

View GitHub Profile
@dheerajrav
dheerajrav / notes.md
Created March 9, 2020 00:46
Reflection Paper Notes

SE + HCI + ML Causal Testing: Understanding Defects' Root Causes by Brittany Johnson

Brittany Johnson

  1. Understanding software practice
  2. Improving software practice
  3. Supporting ethical software practices

(in particular)

#include<iostream>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<algorithm>
#define INRANGE(i, a, b) (i >= a && i < b)
using namespace std;
@dheerajrav
dheerajrav / gist:4006497
Created November 3, 2012 08:01
Music Challenge c
@dheerajrav
dheerajrav / score.rb
Created November 1, 2012 09:53
Probability balls problem score calculator
def balls_score(n, q, a)
#n is the size for which the game is played
#q is the number of questions asked
#a is the number of attempts
if q<((n/2) + 1)
return 0
end
k = n/10
if k<2
k = 2
@dheerajrav
dheerajrav / Bowling
Created October 27, 2012 20:31
FAQ cs3
1. How is the third test case in the sample test case 1?
ans: for the testcase 1 25, only 1 situation is possible. A Strike, A spare and an extra ball using which we can get a 5. 10 9 6 isn't a valid bowling score as for that frame, a strike in the first try and a 9 in the second try will leave 1 pin on the bowling alley and not 6. Hence only 1 valid case results in a score of 25.
For more information on bowling scoring check
https://en.wikipedia.org/wiki/Ten-pin_bowling#Rules_of_play
@dheerajrav
dheerajrav / gist:3857871
Created October 9, 2012 10:34
Input/Output for cops and robbers

Input/Moves made

First Move: Cop

C
19 19 0 0 0 0 0 0

Output

0 1 0 1 1 0