These are good topics to review before an interview as of 21 May 2023:
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
use std::net::{Ipv6Addr, SocketAddr, UdpSocket}; | |
use std::str::FromStr; | |
use std::thread; | |
fn main() { | |
// Create a IPv6 multicast address | |
let multicast_addr = | |
Ipv6Addr::from_str("ff02::11").expect("Could not create multicast address"); |
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
#!/bin/sh | |
# Get notified when you favorite cars are avlailbe! | |
URL="https://www.autovit.ro/autoturisme/de-la-2017\?search%5Bfilter_enum_damaged%5D\=0\&search%5Bfilter_enum_gearbox%5D\=automatic\&search%5Bfilter_enum_keyless_entry%5D\=1\&search%5Bfilter_enum_keyless_go%5D\=1\&search%5Bfilter_enum_no_accident%5D\=1\&search%5Bfilter_enum_original_owner%5D\=1\&search%5Bfilter_enum_pollution_standard%5D\=euro-6\&search%5Bfilter_float_mileage%3Ato%5D\=125000\&search%5Bfilter_float_price%3Ato%5D\=11000\&search%5Badvanced_search_expanded%5D\=true" | |
RESULT=$(eval curl -s $URL | grep -ic "Nu sunt rezultate") | |
if [ $RESULT -eq 0 ]; then | |
# if macOS show a dialog on screen | |
if [ $OSTYPE[1,6] = 'darwin' ]; then |
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 Foundation | |
class Rod { | |
fileprivate var stack = [Int]() | |
public func stackOnTop(diskSize newDiskSize: Int) throws { | |
if let topDiskSize = stack.popLast() { |