completed day 3, ready for day 4.
This commit is contained in:
		
							parent
							
								
									d8c125572f
								
							
						
					
					
						commit
						4a9c8b37b9
					
				
					 15 changed files with 2778 additions and 2 deletions
				
			
		
							
								
								
									
										0
									
								
								src/day03/input.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/day03/input.txt
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										15
									
								
								src/day03/part1.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/day03/part1.rs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
use crate::utilities::*;
 | 
			
		||||
 | 
			
		||||
pub fn part1() -> usize {
 | 
			
		||||
    0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use super::*;
 | 
			
		||||
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn test_part1() {
 | 
			
		||||
        assert_eq!(part1(), 0);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										15
									
								
								src/day03/part2.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/day03/part2.rs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
use crate::utilities::*;
 | 
			
		||||
 | 
			
		||||
pub fn part2() -> usize {
 | 
			
		||||
    0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use super::*;
 | 
			
		||||
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn test_part2() {
 | 
			
		||||
        assert_eq!(part2(), 0);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										14
									
								
								src/day03/solve.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/day03/solve.rs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
mod part1;
 | 
			
		||||
mod part2;
 | 
			
		||||
mod utilities;
 | 
			
		||||
 | 
			
		||||
fn main() {
 | 
			
		||||
    let _input = include_str!("./input.txt");
 | 
			
		||||
    let _structured_input = utilities::parse(_input);
 | 
			
		||||
 | 
			
		||||
    println!("Part One");
 | 
			
		||||
    println!("Result: {}", part1::part1());
 | 
			
		||||
 | 
			
		||||
    println!("Part Two");
 | 
			
		||||
    println!("Result: {}", part2::part2());
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										17
									
								
								src/day03/utilities.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								src/day03/utilities.rs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
pub fn parse(input: &str) -> usize {
 | 
			
		||||
    println!("{}", input);
 | 
			
		||||
    0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod tests {
 | 
			
		||||
    use super::*;
 | 
			
		||||
 | 
			
		||||
    #[test]
 | 
			
		||||
    fn test_parse() {
 | 
			
		||||
        let input =
 | 
			
		||||
"test"
 | 
			
		||||
;
 | 
			
		||||
        assert_eq!(parse(input), 0);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue