Forum Posts
- 1 Answer Best resource to understand asymptotic analysis or time complexity.
I am having a hard time understanding the calculations for time complexity/asymptotic analysis. I tried referring possible algorithm books I could i.e. Cormen, Steven Skiena and few others. I just don't want to memorize the time complexity of every algorithm to clear the interviews, but wish to understand how to come up with the time complexity.
- ACE CA April 27, 2015
Please let me know what is the best way to learn and understand time complexity.| Flag | PURGE - 0 Answers Looking for interview practices
I am applying a CS developer position at major IT companies. Although I have studied many available interview questions, I would like to have more in-person practices. If you are also working towards the same goal, we would help each other to practice more for better result. We can utilize a Skype or similar. Please let me know if you are interested. Usernamepi@outlook.com
- cs April 27, 2015
Thanks.| Flag | PURGE - 0 Answers SQL
I have three tables as mentioned below. I need to implement a basic search functionality where user will search for a keyword which could either match 'title' (from Proposal table) or 'msNumber' or 'description' (from Project table) and should match 'stageNumber' and 'newState' from ProjectLifecycle table.
- ravicandy1234 April 27, 2015
create table Proposal (
proposalId LONG not null primary key,
title VARCHAR(75) null,
);
create table Project (
proposalId LONG not null primary key,
msNumber VARCHAR(75) null,
description VARCHAR(75) null
);
create table ProjectLifecycle (
lifecycleId LONG not null primary key,
proposalId LONG,
stageNumber DOUBLE,
newState LONG,
);
Below is the query which am using right now
SELECT
p.proposalId, p.title, pj.msNumber
FROM
Proposal p
JOIN
ProjectLifecycle pl ON pl.proposalId = p.proposalId
JOIN
Project pj ON pj.proposalId = pl.proposalId
WHERE
(p.title like '%%' or pj.msNumber like '%%')
AND
pl.newState=0
AND
(pl.stageNumber= 60.60 OR pl.stageNumber < 60.60 OR pl.stageNumber = 95.99);
The stageNumber and the newState conditions are working fine as expected but the keyword search isn't.
Please help me in finding where i'm going wrong| Flag | PURGE - 0 Answers trip planner problem
The input is the set of flights between various cities. It is given as a file. Each line of the file contains "city1 city2 departure-time arrival-time flight-no. price" This means that there is a flight called "flight-no" (which is a string of the form XY012) from city1 to city2 which leaves city1 at time "departure-time" and arrives city2 at time "arrival-time". Further the price of this flight is "price" which is a poitive integer. All times are given as a string of 4 digits in the 24hr format e.g. 1135, 0245, 2210. Assume that all city names are integers between 1 and a number N (where N is the total number of cities).
- ry197089 April 23, 2015
Note that there could be multiple flights between two cities (at different times).
The query that you have to answer is: given two cities "A" and "B", times "t1", "t2", where t1 < t2, find the cheapest trip which leaves city "A" after time "t1" and arrives at city "B" before time "t2". A trip is a sequence of flights which starts at A after time t1 and ends at B before time t2. Further, the departure time from any transit (intermediate) city C is at least 30 mins after the arrival at C
what approach will be best for solving this| Flag | PURGE - 0 Answers Hello All
I am planning to shift my Job in India (In companies like linkedIn, FlipKart, Snapdeal ,Amazon,WalMart , Microsoft.
- vishraji81 April 10, 2015
I am 12 years experience in C++ Algorithms and DataStructures . I am average in Algos. The time period I have thought I should give the interviews by next month So Can some one tell me the best strategy to prepare for the job change .| Flag | PURGE - 0 Answers effective parallelisation bilinear interpolation using OpenMP
I want to parallelise bilinear interpolation using OpenMP in such a way that there should be least memory access of input array. In the code below, for each iteration of i and j in output array, input data according to longitude and latitude values are read and processed.
- pritish.naik.004 April 10, 2015
input[20][20] - input array that contains data values eg{1,2,3,..,400} in 2d
lon[100][100] - longitudinal positions of each interpolation point in output array in horizontal axis not necessarily equidistant. eg. {2.34,2.65,2.74... }
lat[100][100] - latitudinal positions of each interpolation point in output array in vertical axis not necessarily equidistant.eg. {5.76,5.92,6.26... }
output[100][100] - array containing interpolated values
void interpolate(float (*lon)[100] ,float (*lat)[100] , float (*input)[100],float (*output)[100]) {
int i,j,floori,floorj;
float fractionj,fractioni;
for(j = 0; j < 100; j++)
{
for(i = 0; i < 100; i++)
{
floori = lon[i][j];
fractioni = lon[i][j] - floori;
floorj = lat[i][j];
fractionj = lat[i][j] - floorj;
output[i][j] = (1.0-fractioni)*(1.0-fractionj)*input[floori][floorj] + fractioni*(1.0-fractionj)*input[floori+1][floorj] + (1.0-fractioni)*fractionj*input[floori][floorj+1] + fractioni * fractionj *input[floori+1][floorj+1];
}
}
}
I need to divide the work in such a way that for all the interpolation points specified using lon and lat values within block of input[floori][floorj],input[floori+1][floorj],input[floori][floorj+1],input[floori+1][floorj+1] should go to one thread so that input values are read only once from memory to register for each thread.| Flag | PURGE - 0 Answers Amazon Onsite Interview Result
Hi
- conundrum4u April 09, 2015
I have had an Onsite interview at Amazon on March 17th(which i think went well from myside). Still didn't hear anything back from them. I have put a mail on Monday but didnt hear back from them.
1.Can you please let me know if anyone who went around the same date, heard anything back?
2. What does this delay usually mean? Is it a Red flag:(
3. Do they usually sent rejection mails or do they not?
Please let me know!
Thanks in advance!| Flag | PURGE - 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