|
Is it Andromeda, right? Riiiight? Where do I get my prize?
|
|
|
|
|
No, silly, it's Uranus.
|
|
|
|
|
I know Pluto is no longer a star, but I thought Andromeda WAS Uranus, unless they've changed it again?
|
|
|
|
|
I suspect them people wouldn't know Uranus from your elbow either.
|
|
|
|
|
... Or even Uranus from urea -- which can be problematic, if you shove the earbuds in too far.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: Or even Uranus from urea
I first read "urethra"...had me seriously confused there for a second with the earbuds...
|
|
|
|
|
Hi All,
Looking up some WPF stuff for an interview Monday (thank you Abhishek Sur) and I have found that I have done the usual generally think something is hard, avoid it, need to do it, learn in a rush.
It doesn't seem to be that hard...fatal thing to say I know.
It seems that you can do some stuff in a different style, mostly...
Mostly scripting...
modified 7-Jan-17 12:29pm.
|
|
|
|
|
|
|
glennPattonInThePubAGAIN wrote: It seems that you can do some stuff in a different style, mostly...
Wait until you try to do anything custom. And binding... shiver
Marc
|
|
|
|
|
|
Nah, it's not that bad. Been using WPF for years now and it's actually pretty nice. The customization ability is powerful.
|
|
|
|
|
|
ASP.Net another one of those things I don't really know (I will have a look though!)
|
|
|
|
|
Good luck with the interview
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
|
Good luck.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
|
Good luck with the interview.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
|
So I took one of their tests as part of a job interview. I really despise these automated assessment tests.
One of the questions involved finding the max length of a subarray of contiguous elements whose sum of the subelements is <= n.
Their example: given an array [1, 2, 3], the sub arrays are:
[1], [2], [1, 2], [2, 3], [1, 2, 3]
I didn't spot the flaw in their example until I coded up the algorithm that gave me the subarrays:
[1], [2], [3], [1, 2], [2, 3], [1, 2, 3]
Hmm, their example was missing [3]!
Stupid tests.
Marc
|
|
|
|
|
So don't keep us in suspense, how quickly did you find the solution?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I don't know, about 10 minutes. And yes, I included the comments in my "solution:"
static int maxLength(int[] a, int k)
{
List<int[]> subArrays = GetSubArrays(a);
int max = 0;
for (int n = 0; n < subArrays.Count; n++)
{
if (subArrays[n].Sum() <= k)
{
if (subArrays[n].Length > max)
{
max = subArrays[n].Length;
}
}
}
return max;
}
static List<int[]> GetSubArrays(int[] a)
{
int l = 0;
List<int[]> subarrays = new List<int[]>();
while (l < a.Length)
{
int idx = 0;
while (idx + l < a.Length)
{
int[] sub = new int[l+1];
for (int i = 0; i <= l; i++)
{
sub[i] = a[idx + i];
}
++idx;
subarrays.Add(sub);
}
++l;
}
return subarrays;
}
Marc
|
|
|
|
|
Recently I did a similar coding challenge for one of the company and I was rejected because I used too many If else statement according to them. Test was asking solution for such a trivial things you don't even bother about such things. One of the solution I provided was to find most common ints from array of ints. I guess I could have put first if else together.
public int[] GetMostCommonInts(int[] input)
{
if (input == null)
{
return input;
}
else if (input.Length == 0)
{
return input;
}
else
{
var groups = input.GroupBy(x => x);
Dictionary<int, int> dictInputCount = groups.ToDictionary(res => res.Key, res => res.Count());
int[] resultInts = dictInputCount.Where(x => x.Value == dictInputCount.Max(y => y.Value))
.Select(x => x.Key)
.OrderBy(x => x)
.ToArray();
return resultInts;
}
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|