Forum Posts

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.
Please let me know what is the best way to learn and understand time complexity. 
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 inperson 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
Thanks. 
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.
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 
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 departuretime arrivaltime flightno. price" This means that there is a flight called "flightno" (which is a string of the form XY012) from city1 to city2 which leaves city1 at time "departuretime" and arrives city2 at time "arrivaltime". 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).
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 
text loans  http://www.samedaytextloans.co.uk
Fees of these payments, regular debts, education costs expenses and many more family bills have to be settled connected with salary which can be generally inadequate.
http://www.samedaytextloans.co.uk 
Spring questions
In normal java program also you do A a= new A(), in spring also when that object is needed we do something like new A() then why do you need spring in this case?

how to find longest chain of nodes
can anyone suggest me how can i find longest chain of nodes in an unweighted acyclic graph. It is also given that u can start from any node.

PROPTIGER member of technical staff (JAVA/Spring/Hibernate) interview questions
Please post PROPTIGER member of technical staff (JAVA/Spring/Hibernate) interview questions ?

Amazon SDE III expectations
Hi
Does anybody know what are the expectations for an SDE III role at Amazon and in particular what are the design skills expected during an interview for SDE III. 
Hello All
I am planning to shift my Job in India (In companies like linkedIn, FlipKart, Snapdeal ,Amazon,WalMart , Microsoft.
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 . 
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.
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.0fractioni)*(1.0fractionj)*input[floori][floorj] + fractioni*(1.0fractionj)*input[floori+1][floorj] + (1.0fractioni)*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. 
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.
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.0fractioni)*(1.0fractionj)*input[floori][floorj] + fractioni*(1.0fractionj)*input[floori+1][floorj] + (1.0fractioni)*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. 
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, input data is read and processed.
input[20][20]  input array that contains data values {1,2,3,..,400} in 2d
lon[100][100]  longitudinal positions of interpolation points in horizontal axis not necessarily equidistant. eg. {2.34,2.65,2.74... }
lat[100][100]  latitudinal positions of interpolation points in vertical axis not necessarily equidistant.eg. {5.76,5.92,6.26... }
output[100][100]  array containing interpolated values
serial code:
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.0fractioni)*(1.0fractionj)*input[floori][floorj] + fractioni*(1.0fractionj)*input[floori+1][floorj] + (1.0fractioni)*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. 
Amazon Onsite Interview Result
Hi
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! 
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 xfactor be that might help me

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?

Need Help for preparation
Hello Everyone,
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 
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.
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 1520 minute time, I don't think they really implemented the complete program. 
java question
void printArray(int i)
{
if(i==0) return;
else printArray(i1);
System.out.println("["+(i1+"]"+values[i1]));
}
explain the above code for i=1 
Data Structures
List of program files, how will you decide which file to compile first and which later, what data structure you will use for storing these dependencies.