ghirlwhocodes
BAN USER 0of 0 votes
AnswersBring up as many approaches: Your goal is to make faster web browser for phones. You can change the phones, the data center etc. There's a limited network bandwidth and the browsers from the companies can't be altered.
 ghirlwhocodes in Switzerland Report Duplicate  Flag  PURGE
Google Software Engineer / Developer Brain Storming  0of 0 votes
AnswersWe've got Quadtrees making up a screen. Every box of the Quadtree has either color white or black. How would you design the data structure of this Quadtree?
And how would you count the number of pixels in a screen of a given color, given a Quadtree?int numberOfPixelsGivenColor(QuadTree* t, bool col)
i used bool to specify white/black.
 ghirlwhocodes in Switzerland Report Duplicate  Flag  PURGE
Google Software Engineer / Developer Algorithm
I solved this with recursion and looking up the index from the last in the array and then go from there.
1. check wether this is the first round and store the first item (temp)
2. put new item=a into first item
3. lookup (index of a)  in the array
4. now put temp in the found place
and so on
list123 = [2,3,1,0]
def trans(temp,index,firsttemp):
lastround=False
i=0
if(temp == None):
firsttemp=list123[0]
temp=list123[0]
firsttemp=list123[temp]
list123[0]=list123[list123[0]]
if(index == firsttemp):
i=1
lastround=True
while i <= len(list123)1:
if(list123[i] == index):
list123[i] = temp
if(lastround == False): return trans(index,i,firsttemp)
else: i+=1
return

ghirlwhocodes
October 31, 2014 Or you could just implement the division function with a whileloop. It's sneaky but it fulfills the requirements.
def mult_rest_indices(array):
sum = 1
for i in array:
sum*=i
result= []
for i in array:
k=0
x=sum
while x>0:
x=i
k+=1
result.append(k)
print result

ghirlwhocodes
October 31, 2014 O(1*N) time complexity and O(1) space complexity:
def nonzero(array):
zero_count = len(array)1
for i in range(0,len(array)1):
if(i+1 >= zero_count):
break
if(array[i] == 0):
while(array[zero_count] == 0):
zero_count = 1
array[i] = array[zero_count]
array[zero_count] = 0
print(array)
if(array[i] == 0): return i
else: return i+1

ghirlwhocodes
October 30, 2014
RepEarned praise for analyzing acne for the government. Earned praised for my work implementing mantra to get desired husband in ...
Repinfo@kukooo.in, Reverse Engineering and System Developer at Abs india pvt. ltd.
Enthusiastic about implementing wazifa to make someone love you.Prior to my current job I was short selling action figures ...
RepSpent 20012006 licensing the elderly in Jacksonville, FL. Spent 20012004 consulting about Break Up Spell. Spent two years deploying crickets ...
RepRosendoVBarhorst, Employee at US
Enthusiastic about implementing wazifa to make someone love you.Prior to my current job I was short selling action figures ...
RepSince 1991, Lakeview Blinds Awnings & Shutters offers stunning interior and exterior blinds, shutters, awnings and security doors & windows to the ...
RepHave a strong interest in donating yogurt for the underprivileged. Spent several years building cabbage in Miami, FL. Spent several ...
Open Chat in New Window
This is what I did:
unfortunately I had the else still standing there while the interview
 ghirlwhocodes April 23, 2015