Whoelse's Posts
Nairaland Forum › Whoelse's Profile › Whoelse's Posts
1 2 (of 2 pages)
Dramatic doesn't even cut it. That scene was the most painful part of any series, film, documentary and what have you. How can a family be that cursed? Damn!!! |
See if you can contact then persuade the admin of PINRELOAD.com to get you the phone no. that was recharged at that time. Who knows, it could be someone close to you. |
BlackBaron: Just one question...What exactly is the use of Nexus Q?For bragging rights I guess. Seems like crap. |
Would have been nice. Problem is its not a focus going forward so we're still kinda stuck with java android. |
Its much easier, and IMHO, much more efficient to evaluate based on puzzles than mini web apps cos when evaluating people, its not about getting or not getting it right, but its more about the thought process. Puzzles can also be more targeted and direct as to what you want to achieve. Besides, lets not forget the part that many programmers detest building web apps. ![]() For me, I'll definitely swing the puzzle path. |
Interesting |
@ linkin8k:Till date, i still do. Even though i'm already on it via an RUU option. |
@OminPotens, Yea, you can reverse engineer them. If its a .NET dll, then you can check up Reflector [/b]by [b]RedGate. It doen't work perfectly though, you may just need to re-write code here and there but its accuracy is about 90%. (Unobfuscated code only ). |
mexzony:You'll go far if u stick wit the bolded. Back to your question, from what i can see, you've pretty much solved the problem. You pick card A and card B and switch positions and voila, ur done. Only thing then is, you can do this as many times as u like(this is where ur loop should come in. A for or while loop will suffice). |
amor4ce:Lol @bolded. Thats some serious talk there. Steve Jobs was a phenomenon, no doubt. But, I hope they'll sustain their tempo without him though. There's just too much heat right now. |
Thatdave:Nope. |
Double N:@DoubleN, na u dem owe pass. @LynxNoon Whats the best ROM for the Desire S u've currently used and the cons, if any. |
lynxnoon:No scarce the guy from the android fam nah. ![]() Unless the price has gone up, at the same DSCL in V.I. it was 73k when the Desire S was 70k. Left to me, it should be cheaper. ![]() |
Did the fone section just turn to the recycle bin? ![]() |
Azanor:The Desire S is 70k at DSCL. |
MrBible:I feel ur pain bro if this is cos of that hawt prize ![]() MrBible:Just for a while imagine that ur fullArray is actually 3 arrays as follows. int[] fullArray1 = {0,8,1,0,0,0,8,6,7,8,9,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1,1,3,0}; int[] fullArray2 = {1,0,0,0,8,6,7,8,9,1,3,0,0,8,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1}; int[] fullArray3 = {1,0,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,0,0,8,6,7,8,9,1,3,0,0,8,9,1}; and also the search Array int[] searchArray = {1, 3, 0, 0, 8}; Looking at arrays fullArray2 and fullArray3, its easy to see that the searchArray is a contained in both of them. The trick is mainly in fullArray1 where the searchArray starts from around the end of the array and goes to the beginning. Do u get now? |
Damn. Did it and felt stoopid, Nice. |
MrBible:@MrBible Just so u know, Beaf has the winning code. ![]() I also think ur making the same mistake i initially made. Ur variable fullArray is not one array but 3. Take note. |
@Slyr0x Answers yet? |
^^^I'm so envying Beaf too. At least i could have enjoyed that prize while it lasted, Dammnnn. Beaf, that is the problem; you should have stated that you wanted all occurrences; you are just confusing everyone. Completely state your goals next time, and don't keep people guessing. Anyway, I dash you one GBOSA for letting folks use their brains, rather than complaining about the dullness of the programming section.@omo_to_dun The funny thing is i actually considered that but as Beaf stated in his question, he just requested for the array as a single unit so its safe to say my assumptions are correct. I still consider myself as part-winner. @ekt_bear Seen your posts in other sections. Didnt think programming was your tin. Thumbs up on ur analysis. @Beaf Where's my share of the prize ![]() |
Your solution is very similar to one of mine and with less code too! So, tentatively we give it to. . . Hehe!!!Not yet giving it to me? ![]() My solution is similar to whoelse's, but much more efficient. He just needs a couple of optimisations to remove the need to repeat the loop.Thought making it a lil bit clearer wouldn't be a bad idea. Are you able to do it in N steps rather than the 2N he uses? This is the only other substantial area of improvement. But I don't think it is possible to do it in N steps. . . you sort of have to double the original array one way or another (something akin to what he did.)Funny, just as i was about trying it out, I got an even better response from someone else I showed the question. public static int Check(int[] searchArray, int[] fullArray) BTW Beaf, a very cool thread for the programming section. The fact that peeps post in different languages might just encourage some of us to pick up another language. |
I'm back class ArraySearch { static void Main(string[] args) { int[] searchArray = new int[] { 1, 3, 0, 0, 8 }; int[] array1 = { 0, 8, 1, 0, 0, 0, 8, 6, 7, 8, 9, 5, 2, 6, 3, 0, 7, 4, 1, 1, 0, 0, 7, 0, 0, 8, 6, 7, 8, 9, 5, 9, 1, 1, 3, 0 }; int[] array2 = { 1, 0, 0, 0, 8, 6, 7, 8, 9, 1, 3, 0, 0, 8, 5, 2, 6, 3, 0, 7, 4, 1, 1, 0, 0, 7, 0, 0, 8, 6, 7, 8, 9, 5, 9, 1 }; int[] array3 = { 1, 0, 5, 2, 6, 3, 0, 7, 4, 1, 1, 0, 0, 7, 0, 0, 8, 6, 7, 8, 9, 5, 0, 0, 8, 6, 7, 8, 9, 1, 3, 0, 0, 8, 9, 1 }; DisplayResult(ArraySearch.Check(searchArray, array1)); DisplayResult(ArraySearch.Check(searchArray, array2)); DisplayResult(ArraySearch.Check(searchArray, array3)); Console.Read(); } private static void DisplayResult(int result) { if (result == -1) { Console.WriteLine("Search array was not found." ;} else { Console.WriteLine("Array found and starts at index {0}", result); } } /// <summary> /// Searches an array for another array. /// </summary> /// <param name="searchArray">The array to be searched for.</param> /// <param name="fullArray">The array to search in.</param> /// <returns>If -1, then the array doesn't exist, else returns the start index of the first item.</returns> public static int Check(int[] searchArray, int[] fullArray) { int invalid = -1; //Check for empty arrays. if(fullArray == null || fullArray.Length == 0) { return invalid; } //And here too. if (searchArray == null || searchArray.Length == 0) { return invalid; } //Check that the length of the full array can contain the searchArray. if (searchArray.Length > fullArray.Length) { return invalid; } int currentIndex = 0; int fullArrayIndex =0; //To solve the circular reference thing, just loop twice, for (int i = 0; i < fullArray.Length * 2; i++, currentIndex++) { fullArrayIndex = i; if (i >= fullArray.Length) { fullArrayIndex = i - fullArray.Length; } if (fullArray[fullArrayIndex] == searchArray[currentIndex]) { //Check if all the items in the array have been searched for. if (searchArray.Length == currentIndex +1) { return i + (currentIndex * -1); } } else { //Rewind back to the last known stop. i += (currentIndex * -1); currentIndex = -1; } } return invalid; } } |
@Beaf Sorry man. didnt even realize they were different arrays unto i saw your response. I guess thats what u and @omo_to_dun were talking about when u both talked about circular arrays. Dont worry, i'll be back wit the answer soon enough. Till then, nothing from u pls. |
My answer, in C# class ArraySearch { static void Main(string[] args) { int[] searchArray = new int[] { 1, 3, 0, 0, 8 }; int[] fullArray = new int[]{0,8,1,0,0,0,8,6,7,8,9,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1,1,3,0, 1,0,0,0,8,6,7,8,9,1,3,0,0,8,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,9,1, 1,0,5,2,6,3,0,7,4,1,1,0,0,7,0,0,8,6,7,8,9,5,0,0,8,6,7,8,9,1,3,0,0,8,9,1}; int result = ArraySearch.Check(searchArray, fullArray); Console.WriteLine("Your answer is {0}", result); Console.Read(); } /// <summary> /// Searches an array for another array. /// </summary> /// <param name="searchArray">The array to be searched for.</param> /// <param name="fullArray">The array to search in.</param> /// <returns>If -1, then the array doesn't exist, else returns the start index of the first item.</returns> public static int Check(int[] searchArray, int[] fullArray) { int invalid = -1; //Check for empty arrays. if(fullArray == null || fullArray.Length == 0) { return invalid; } //And here too. if (searchArray == null || searchArray.Length == 0) { return invalid; } //Check that the length of the full array can contain the searchArray. if (searchArray.Length > fullArray.Length) { return invalid; } int currentIndex = 0; for (int i = 0; i < fullArray.Length; i++, currentIndex++) { if (fullArray[i] == searchArray[currentIndex]) { //Check if all the items in the array have been searched for. if (searchArray.Length == currentIndex +1) { return i + (currentIndex * -1); } } else { //Rewind back to the last known stop. i += (currentIndex * -1); currentIndex = -1; } } return invalid; } } |
@Beaf, I definitely go wit u. I am so not a fan of form design even though i come out wit nice stuff when i try. I know how many times i've tried Silverlight, MVC, and regular ASP.NET stuff, but yet, i seriously wish that part cud be removed 4rm the software cycle. I'm waitin 4 u guyz ideas though. Maybe some alternative, |
U guyz are def. kidding, rite |
What if U r the anti-chirst ![]() |
Ever heard of lucene If ur into .NET, then u cud check up lucene.net. |
To all the lions and lionesses, stay ahead, naturally. ![]() |
Forever in our hearts, always. |
All you "liarers", pls give @poster a chance and help him out. ![]() |
That advert is just 222222222222222 cool. Dakore is wonderful. i luv that chik. Also, kudos to the amstel malta people 4 the advert and the previous one. Both of them are off the hook. |
1 2 (of 2 pages)

).

Nice.
;