This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math' as math; | |
void main() { | |
double volOf2DHypersphere = volumeOfHypersphere(2, 1000); | |
} | |
double volumeOfHypersphere(int dimensions, int simCount) { | |
int withinCircleCount = 0; | |
List<List<double>> pointArray = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
fn binary_gap_length(mut x: u32) -> u32 { | |
let instant = Instant::now(); | |
let mut index:u32 = 0; | |
let mut gap_length:u32 = 0; | |
x = x >> x.trailing_zeros(); | |
while x != 0 { | |
if x & 1 == 1 { |