Forum Posts
0 Answers Resume tips
I have around about 3 yrs exprience in the field of developing iOS apps,and have developed 8+ apps. My GPA is bad,and i am not from any premier institute, So breaking all my negative beliefs,i have applied for Google and Amazon,i have tried adding whatever i could in my resume,but i am wondering what would that x-factor be that might help me
- vnhrmth April 07, 2015| Flag | PURGE 1 Answer Applied for software engineer position
I have applied for multiple companies,such as google and amazon,i don't have a github account and haven't contributed to open source or created any library,i have developed 8 applications for iOS,My academics isn't that great,i was wondering if these companies would still give me a chance,if no i would want to know,how to be seen by these companies? How can i make my mark?
- vnhrmth April 07, 2015| Flag | PURGE 2 Answers Need Help for preparation
Hello Everyone,
- saikat1239 April 04, 2015
I need your help to prepare data structure and algorithm question. Can anyone suggest any book that easy to understand and would take less time to prepare? I am not much confident in Java. Please advise.
Thanks| Flag | PURGE 1 Answer Programming questions in Epic Online Assessment test
I've gone through few of the programming questions asked for epic's online assessment test. Most of them are really tough questions considering we have to implement a program within a constrained time.
- johngraziola April 03, 2015
My question is, do we really need to implement the program or else is it ok if we write an algorithm/approach on how we solve it.
Few people say they have implemented the program in 15-20 minute time, I don't think they really implemented the complete program.| Flag | PURGE 0 Answers Given a function which return TRUE 60% of the time, how can I create a function which return True X% of the time (X is the input parameter)?
Given a function which return TRUE 60% of the time, how can I create a function which return True X% of the time (X is the input parameter)?
- n179911 March 27, 2015
bool random60() { return Random.rand() < 0.6; } Random.rand() return a number between 0 to 1;
bool randomX(float X) { .... }| Flag | PURGE 0 Answers Fast way to store employee objects via zip code lookup.
Ok so you have a hash map of employees keyed off a unique key of employee id. But you also want to be able to answer a question which is give me all employees that have the zip code XXXXX, or whatever. What is a fast way to do this? Keep in mind that when you insert/update/delete employees into this hashmap you must also manage any other data structure you have so that the zipcode index is balanced and accurate.
- eriklukeyale March 24, 2015
I had proposed to use another hashmap, where the key is the zip and the value is a linkedlist of pointers to the employees in the employee hashmap, but this becomes O(n) for insert/delete and lookup because you have to walk the entire list of elements in the linked list in the zipcode hashmap. Can we do better, any ideas on making this a faster index, lookup and make sure its balanced? Thanks| Flag | PURGE 0 Answers Given 5 horses or runners and 10 sensors return top runners
Basically you have 5 horses running. There are 10 sensors spread out over the race. You want the ability to ask what are the 5 fastest horses in order and do so in the fastest way. How would you construct the data structures in order to return the top fastest running horses? Should minimize overhead and be as fast as possible to return the top in order. Any ideas? Thanks.
- eriklukeyale March 24, 2015| Flag | PURGE 0 Answers Given an integer of a certain bit length, does it have an even or odd number of parity bits?
The code is
- chandram.CM26 March 23, 2015
public static Integer evenParity(Integer number){
return (number == 0) ? 0 : ((number&1) + evenParity(number>>1))%2;
}
I am a newbe, I have a basic question here. We need to count the number of ones and if they are odd, then its odd or even parity bit. Now, when we look at the code, the code keeps right shifting the number until it reaches '0'. So, we are counting bits from different number than the one passed.My, understanding was we should count the one bits of a given number without chaining the number. Even though this code is working correctly I'm not able to understand how this is working.
Thanks| Flag | PURGE 0 Answers Looking for Milwaukee interview and coding question buddy
Hi all!
- litehsu March 20, 2015
I am currently preparing for interviews and would like to meet up with some one to practice coding and mock interviews in Milwaukee area!
You can reach me at my email litehsu@gmail
thanks!| Flag | PURGE 2 Answers Looking for a study buddy in Portland, OR area
I have a technical phone interview for Google on the 6th of April and I want to make sure I am prepared.
- hbourke@pdx.edu March 20, 2015
I'm a recent grad (really, really recent, I literally graduated today, a couple of hours ago).
I need to study quite a bit so I feel comfortable, because I tend to be a nervous interviewee.
The thing is, I'm so used to studying in groups in college. I don't like studying by myself! It feels lonely, plus I am more focused when I am working together with someone.
If you are also studying for an interview in the Portland area, maybe we can meet at the PSU or downtown library or a coffee shop and work.
P.S.,
I'm really looking to *get things done*. So while breaks are necessary and occasional chit-chat is fine, the objective is not to meet people. The perfect study buddy would be someone who is also motivated.| Flag | PURGE 0 Answers Using Disjoint Data Structures
Downtown Gotham is booming and the main road is now lined with a continuous row of skyscrapers. For aesthetic reasons, the Gotham Development Council had banned advertising hoardings along the main road.
- f2010190@pilani.bits-pilani.ac.in March 17, 2015
The High Court has squashed the Council's ban as unconstitutional and ruled that rectangular hoardings may be put up parallel to the main road, along the walls of the skyscrapers lining the road. The only restriction is that a hoarding may not extend above the height of any building along its length. Advertising agencies across the city are buzzing with excitement at the news and accounts executives are busy calculating how large they can make their hoardings, in terms of total area, to collect maximum revenue from advertisers.
Suppose the skyline is represented as follows, where each skyscaper is represented by its height and width, both quantities measured in metres. The first line of input is an integer N, the number of skyscrapers. This is followed by N lines of input describing the skyscrapers in left to right order. Each of these lines consists of two integers W and H, specifying the width and height of the skyscraper, respectively. The task is to compute the maximum area that a hoarding can have for a given arrangement of skyscrapers.
8
20 30
10 50
30 70
20 50
10 10
20 55
30 80
20 40
It is my first program in C++, in Union-Find and using vectors(yeah too ambitious for the first problem). I wanted to know if the flow of the program is atleast partially correct. Besides, I am getting the error: “glibc detected” along with a wrong answer. So, should I start afresh or am I almost there?
#include <iostream>
#include <algorithm>
#include <vector>
#define N_MAX 100000
using namespace std;
vector<int> parent;
vector<int> rank;
//vector<int> length;
vector<int> ht;
vector<int> wt;
class skyscraper
{
public:
int height;
int width;
};
struct sortH
{
int i,height;
bool operator<(const sortH& p)const
{
return (height > p.height);
}
};
void make_set(int x,int height,int width)
{
parent[x] = x;
rank[x] = 0;
//length[x] = 1;
ht[x] = height;
wt[x] = width;
}
int find(int x)
{
if(parent[x] != x)
{
parent[x] = find(parent[x]);
}
return parent[x];
}
void set_union(int x,int y)
{
int root_x,root_y;
root_x = find(x);
root_y = find(y);
if(rank[root_x] < rank[root_y])
{
parent[root_x] = root_y;
}
else
{
parent[root_y] = root_x;
rank[root_x] += (rank[root_x] == rank[root_y]);
}
}
int main()
{
int N,i,j,k,l,x,y,z;
int H;
int W;
int Amax,LA,RA,A,S;
cin >> N;
//Union of children
parent.resize(N);
rank.resize(N);
ht.resize(N);
wt.resize(N);
////////////////////////
sortH p[N];
vector<skyscraper> skyline(N);
for(i = 0; i < N; i++)
{
cin >> skyline[i].width;
cin >> skyline[i].height;
p[i].height = skyline[i].height;
p[i].i = i;
make_set(i,skyline[i].height,skyline[i].width);
}
sort(p,p+N);
H = p[0].height;
W = skyline[p[0].i].width;
Amax = H * W;
for(i = 1; i < N; i++)
{
j = p[i].i;
k = j-1;
l = j+1;
S = skyline[j].height * skyline[j].width;
x = skyline[j].height;
y = skyline[k].height;
z = skyline[l].height;
if(x < y)
{
set_union(k,j);
ht[k] = x;
wt[k]+= skyline[k].width;
LA = ht[k] * wt[k];
}
if(x < z)
{
set_union(l,j);
ht[l] = x;
wt[l] += skyline[l].width;
RA = ht[l] * wt[l];
}
if(S < LA) S = LA;
if(S < RA) S = RA;
if(Amax < S) Amax = S;
}
// if(skyline[j].height
// }
// for(int i = 0; i < N; i++)
// {
// cout << skyline[i].height << ' ' << skyline[i].width << endl;
// }
// for(int i = 0; i < N; i++)
// {
cout << Amax << endl;
// }
}| Flag | PURGE 1 Answer Amazon. been two days no phone interview confirmation email
I got an email from Amazon on Friday night that I completed the first assessment and they will set up one phone interview. They asked me about the best times for me and phone number to call on. Today I still have not received any email message yet with the confirmation of when the interview is.
- moezein92 March 10, 2015
Any thoughts ? How long did it take them to confirm the times for the phone interview with you?| Flag | PURGE 2 Answers Puzzle
8 people want to cross a river via boat only. They are mother , father, policeman, criminal, 2 daughters, 2 sons.
- mailtosumeet88 March 02, 2015
The boat can be driven by Police, mother or father only.
The boat carries only 2 people at a time.
The criminal if left without police can hurt someone but wont run away if he is alone.
The daughters left without mother would be hurt by the father.
The sons left without Father would be hurt by the mother.
If one a riverside mother is absent and father arrives by boat, he can still hurt the daughters and vice versa.
Find a way to take them all to the other side safely, without hurting anyone.| Flag | PURGE 0 Answers Finding first no repeated characters in string
How it is possible to use HashMap or HashTable to find out first non repeated character since both HashMap and HashTable does not guarantee that the order of the map will remain constant over time?
- Arunkumar V February 20, 2015| Flag | PURGE