Skip to content

Instantly share code, notes, and snippets.

@Mawulijo
Mawulijo / InterviewCake-HiCal
Last active December 5, 2020 19:40
Your company built an in-house calendar tool called HiCal. You want to add a feature to see the times in a day when everyone is available. To do this, you’ll need to know when any team is having a meeting. In HiCal, a meeting is stored as an object of a Meeting class with integer variables startTime and endTime. These integers represent the numb…
package main
import (
"fmt"
"sort"
)
type Meeting struct {
StartTime int
EndTime int
@Mawulijo
Mawulijo / replaceForLoopWithforEach.js
Created May 1, 2019 15:59
Solutions to foEach challenge
const users = [
{ id: 1, name: 'luke', age: 67, bestFriend: 'R2', pay: '', isOldest: undefined},
{ id: 2, name: 'han', age: 76, bestFriend: 'Chewie', pay: '', isOldest: undefined},
{ id: 3, name: 'chewie', age: 74, bestFriend: 'Han', pay: '', isOldest: undefined},
{ id: 4, name: 'rey', age: 26, bestFriend: 'Finn', pay: '', isOldest: undefined},
{ id: 5, name: 'kylo', age: 35, bestFriend: 'Kylo', pay: '', isOldest: undefined},
]
// ====================1==================
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:stackoverflow/home/index.dart';
import 'package:pk_skeleton/pk_skeleton.dart';
class HomeScreen extends StatefulWidget {
const HomeScreen({
Key key,
@required HomeBloc homeBloc,
}) : _homeBloc = homeBloc,
@Mawulijo
Mawulijo / config.js
Created April 17, 2019 15:07 — forked from codediodeio/config.js
Snippets from the Firestore Data Modeling Course
import * as firebase from 'firebase/app';
import 'firebase/firestore';
var firebaseConfig = {
// your firebase credentials
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
package main
import (
"log"
"os"
"fmt"
"bufio"
"strings"
)