Skip to content

Instantly share code, notes, and snippets.

View Ruszrok's full-sized avatar
🥳
Advent of code - 2022

Ruszrok Ruszrok

🥳
Advent of code - 2022
View GitHub Profile
def solver(array):
local_max_indexes =[]
local_max_indexes.append(0)
left_max = local_max_indexes[0]
last_ex_ind = [0];
for i in xrange(1, len(array) - 1):
#print array[i-1], array[i], array[i+1]
if(array[i] > array[i-1] and array[i] > array[i+1]):
if(array[i] >= array[left_max]):
local_max_indexes.append(i)
@Ruszrok
Ruszrok / ReaderComparer.cs
Last active December 30, 2015 17:29
Microsoft.VisualBasic.FileIO.TextFieldParser vs String.Split
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualBasic.FileIO;
using System.Diagnostics;
namespace ReaderComparer
use std::io;
use std::io::Write;
use std::io::BufReader;
use std::io::BufRead;
use std::fs;
use std::fs::File;
static LOG_NAME: &'static str = "log.txt";
fn include_file(file_name: &String) -> bool{