↳
FYI, in 2020, this is still relevant.
↳
Relevant in 2021 too.
↳
OP here. Yes, for my interview on site they only asked two
↳
Another approach would be to create a hashtable/dict with key as a tuple (city,hotel name) and value to be the occurrence of the hotel name in that city (count, keep incrementing the count when seen). When the hashtable is created, iterate over items and see whose value >= 3 and return the tuple's/key 1st value Less
↳
using golang ---- package main import ( "fmt" ) func main() { input := [][]string{{"hotel_1234", "Sheraton", "Amsterdam"}, {"hotel_1000", "Sheraton", "Buenos Aires"}, {"hotel_1001", "Hilton", "Amsterdam"}, {"hotel_1002", "Royal Palace", "Bogota"}, {"hotel_1003", "Hilton", "Amsterdam"}, {"hotel_1004", "Sheraton", "Buenos Aires"}, {"hotel_1005", "Sheraton", "Buenos Aires"}, } confuse_cities := []string{} Cities := make(map[string]map[string]int) for _, line := range input { if _, ok := Cities[line[2]]; ok { if val, ok2 := Cities[line[2]][line[1]]; ok2 { Cities[line[2]][line[1]] = val + 1 if Cities[line[2]][line[1]] == 3 { confuse_cities = append(confuse_cities, line[2]) } } } else { Cities[line[2]] = map[string]int{} Cities[line[2]][line[1]] = 1 } } fmt.Println(confuse_cities) } Less
↳
from collections import Counter Input = [ ("hotel_1234", "Sheraton", "Amsterdam") , ("hotel_1000", "Sheraton", "Buenos Aires") , ("hotel_1001", "Hilton", "Amsterdam") , ("hotel_1002", "Royal Palace", "Bogota") , ("hotel_1003", "Hilton", "Amsterdam") , ("hotel_1004", "Sheraton", "Buenos Aires") , ("hotel_1005", "Sheraton", "Buenos Aires"), ("hotel_1232", "Sheraton", "Amsterdam"), ("hotel_123222", "Sheraton", "Amsterdam") ] confusing_cities = [] for i,v in Counter((elem[1],elem[2]) for elem in Input).items(): if v >= 3: confusing_cities.append(i[1]) print(confusing_cities) Less
↳
I am sincere with my job. And i know I can easily handle all over the problems.... And work with honestly.. Less
↳
I am sincere with my job. And i know I can easily handle all over the problems.... And work with honestly.. Less
↳
I am sincere with my job. And i know I can easily handle all over the problems.... And work with honestly.. Less
↳
last year I was an instructor in an afterschool program. This was my first time with a large class. It made me realize the importance of having routines and behavior management techniques in the class so the next time I have large groups of kids I plan to have an opening and closing circle, having students line up prior to class only allowing the quiet one standing in line the right way into class and having a 5 minute transition period from one activity to the next using music on my phone and verbal reminders Less
↳
For discipline problems I would first give a verbal warning, 2nd I have the students sit in a corner in the back of the room for 5 minutes then ask why they're there. Usually they know why and then I ask what they will do differently. If the behavior continues I contact my supervisor. If students are fighting I would separate them have them write or draw out problem depending on grade level then ask each person what happened and then have them find a solution Less
↳
for motivation I would use incentives as I do with a new student I first have him do a certain amount of work and then give timed breaks incorporating what was learned Less
↳
The correct approach is to show that you can break down the problem. 2^32 = 2^10 * 2^10 * 2^10 * 2^2. 2^10 = 2^8 * 2*2 = 256 * 4 ~(roughly) 1000 So: 2^32 ~ 1000 * 1000 * 1000 * 4 = 4,000,000,000 Less
↳
4 giga
↳
The number that will overflow a variable of type unsigned 32-bit int. const MAX_U32INT = 2^32 -1 Less
↳
No, I worked at the department listed on my resume.
↳
Yes I have 4 years expirence in dubai I have driving license
↳
Yes I have 3year experienc in warehouse control for garment field in Saudia Arabia.. but now I am in dubai and I have UAE licence.. Less
↳
P2P is the first thing that came to my mind. BitTorrent is a good tool and I believe Twitter or Facebook has developed this kind of distributing tool based on BitTorrent protocol. And I don't believe the 1TB data will be read at the same time. We can write a FUSE module that mount the directory from the central server. When one of the files was read, we can copy it and cache it locally. Less
↳
P2P is the best solution. If P2P is not allowed. We can use broadcast, for example: server1-> server2, then we have 2 sources, server1->server3, server2-server4; then it will take about (time to transfer one copy)*log(10000)= 3*3.32192809489*(time to transfer one copy). For fault tolerance, redundancy or retry. Or deploy a distributed file system so that file can be accessed. Central server solution is like NFS, however, NFS's server could be bottleneck. Less
↳
We can take checksum of the file when it is correct and compare it with the checksum of the same file in future. If both checksum are found to be same then the file isn't corrupted otherwise it is corrupted. Less
↳
That is very low for a director position.
↳
Ridiculous
↳
That's minimum wage, so they require a degree for minimum wage?
↳
I have studied at K.S.RANGASAMY COLLEGE OF TECHNOLOGY
↳
I have studied at Dhanalakshmi Srinivasan Institute of Technology
↳
I have studied at SATHYABAMA UNIVERSITY...