Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Basic Codes/Birthday.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//Birthday Paradox problem
class HBD {
static double find(double p) {
return Math.ceil(Math.sqrt(2 * 365 * Math.log(1 / (1 - p))));
}

//Driver
public static void main(String[] args){

System.out.println(find(0.70));
}
}