## Forum Posts

- 1 Answer
**asking solution for the problems**Q1: Write a MATLAB function le that takes a matrix A as an input and returns it's diagonal part D, lower triangular part L and upper triangular part U.

- jinglan.seiran April 25, 2014

Q2:Write a MATLAB function maxmin that returns the maximum and minimum value for an input array

x as well as the indices that correspond to the maximum/minimum.| Flag | PURGE - 2 Answers
**Study Group for Technical Interview Prep**Anyone interested in forming a study group for preparing for technical interviews in Los Angeles.

- natesilver969 April 20, 2014

I was thinking of setting it up as a boot camp style immersive environment where we tackle one interview prep book per month along with brushing up on basic cs stills.

Let me know if anyone is interested. Thanks !| Flag | PURGE - 1 Answer
**Enterprise Java Development**Good evening everyone,

- mJr April 18, 2014

I hope this message finds you well.

Right now I'm in the middle of a diploma for java enterprise and web development, and I was wondering about my chances to land a job at Google, Facebook, etc., as I think that they will be more interested in algorithmic, problem-solving-based skills other than enterprise frameworks and tools.

Thanks. :)| Flag | PURGE - 48 Answers
**Microsoft Online Technical Screen**Hi,

- andy.java.9 April 12, 2014

Ddoes anyone know what to expect in Microsoft 'online technical screen'? This is not the phone screen with real person but online technical screen which needs to be completed in one sitting of 45 minutes.

Thanks,

Andy| Flag | PURGE - 1 Answer
**How to get referral**Hi Friends,

- snigda.2000 April 12, 2014

Most of the companies will not select your resume for interview if you do not have referrals and a degree from top school etc. How to get Interview scheduled? and how to get referrals from employees working in top companies if you do not know anyone in that company?

Thank you,

Snigda| Flag | PURGE - 0 Answers
**How to get the combination in matrix**How to get the combination in matrix. For ex: we have martrix as shown below.

- hebbaruday April 10, 2014

A D E

B null F

C null null

Consider A B C are root nodes i.e first columns and each column we have to pick the one element and generating the combination.

ADE

ADF

BDE

BDF

CDE

CDF

A D E

B Z F

C null null

ADE

ADF

AZE

AZF

BDE

BDF

BZE

BZF

CDE

CDF

CZE

CZF| Flag | PURGE - 4 Answers
**Square Board : Grasshoper on ChessBroad**0

- jsd.learner April 03, 2014

of 0 votes

1

Answer

Unable to get what exactly the Question Is?

so What is the whole logic behind this question .It seems to be complete Math problem to me.

There is a Grasshopper in a tropical forest. The grasshopper can jump only vertically and horizontally, and the length of jump is always equal to x centimeter. A GRasshopper has found herself at the center of some cell of the chess board of the size pxq centimeters(each cell is 1x1 centimeters). She can jump as she wishes for an arbitrary number of times, she can even visit a cell more than once. the only restriction is that she cannot jump out of the board.

The grasshopper can count the number of cells that she can reach from the starting position(x,y). Let's denote this amount by dx,y. your task is to find the number of such starting position(x,y), which have the maximum possible value of dx,y

Input

The integer array contains three integers p,q,x

p= length of the board

q= width of the board

x=length of the grasshoppers jump.

Output

Output the only integer - the number of the required starting position of the Grasshopper

Example

input 2 3 1000000

output 6

input 3 3 2

output 4

Regards,

JSD| Flag | PURGE - 0 Answers
**Alternative solution for problem 5.3 from 'Cracking Coding Interview" book**Just something I cannot not share :) I think we can avoid loops in this problem:

- bufistov April 03, 2014

uint64_t GetNext_NP(uint64_t n)

{

if (n == 0 || n == -1ull)

{

return 0;

}

uint64_t first_one_mask = ((n ^ (n - 1) ) + 1) >> 1;

uint64_t first_zero_mask = ((n ^ (n + first_one_mask)) & (n + first_one_mask));

n |= first_zero_mask;

first_zero_mask >>= 1;

n &= ~first_zero_mask;

n &= ~(first_zero_mask - 1);

n |= (first_zero_mask / first_one_mask) - 1;

return n;

}| Flag | PURGE

**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.

Open Chat in New Window