₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,885 members, 8,447,538 topics. Date: Saturday, 18 July 2026 at 01:43 PM

Toggle theme

Ektbear's Posts

Nairaland ForumEktbear's ProfileEktbear's Posts

1 2 3 4 5 6 7 8 ... 203 204 205 206 207 208 209 210 211 (of 485 pages)

ProgrammingRe: Puzzle of the day by ektbear(op): 2:14pm On Jan 30, 2012
1. Yep, first is pairing. You just pair the first and last, the second and second to last, etc. Then sum up.

2. Nope, not 2. It actually requires a bit of consideration of cases, and some effort. You expect 2 coin flips to get 1 head on average. But how many coin flips do you expect for 2 consecutive heads?

3. You create a big temporary array "fin" right? You are allowed to do this for (A), but not for (B). For (B), the idea is that you want to do some simple operations on arr that transform it into the desired result, but only using a constant amount of additional space (say you only have one temporary integer available to you.)

Also, if you sort the input array first, then the problem becomes dead easy. You want to avoid sorting. No sorting allowed for either (A) or (B) of this problem.
ProgrammingRe: Algorithm Code To Rank Photos In Websites by ektbear: 1:51pm On Jan 30, 2012
I don't think this is a terrible question. It is ill-defined, but not boring/trivial/etc.

Mindlessly coding or whatever is a very bad idea and waste of time without first being more specific about what you want.
PoliticsRe: Fulani Herdsman Chops Off A Vulcaniser's Right Hand In Akure. by ektbear: 1:43pm On Jan 30, 2012
I don't understand why these guys aren't armed with guns or weapons of their own.

If you chase away a Fulani's cows, then you should be prepared for violence immediately after.

smh

Better a course of action is to probably once you chase away/kill the cows, find and kill the herdsman too
Music/RadioRe: New Video: Olu Maintain - Nawti [cameo Appearance By Natalie Nunn] by ektbear: 1:31pm On Jan 30, 2012
Natalie Nunn is sexy as hell.

Got damn!!
TV/MoviesRe: A Game Of Thrones, New Series On Hbo/sky Atlantic by ektbear: 8:31am On Jan 30, 2012
April 1st is too far away. . . sad
ProgrammingRe: Puzzle of the day by ektbear(op): 7:27am On Jan 30, 2012
Here is what a sample run of the algorithm looks like:


A=[2, 0, 3, 4, 3, 0, 2, 1, 4, 2]

produces:
B = [1, 0, 0, 3, 4, 4, 3, 2, 2, 2]

and

I_1, I_2, I_3 = [3, 7, 3]
ProgrammingRe: Puzzle of the day by ektbear(op): 7:01am On Jan 30, 2012
Another one.

I'm given an array of N numbers. Call the array A.

Let's assume that arrays are zero-indexed, like in C, C++, Java, etc.

A)
Design an algorithm that will output a list B that is a rearrangement of A (i.e., permutation) such that:

1. The last element the new array B is the same as the last element of A. Call this pivot element x.
2. I have three indices I_1, I_2, and I_3, such that:
a. All elements with index less than I_1 are less than x.
b. All elements with index less than I_2 but >= I_1 are greater than x.
c. All elements with index >=I_2 are equal to x.

You are allowed to create a temporary array of size N for this problem.

B) Design a variant of the above algorithm that doesn't require a temporary array, that transforms A into B in place. You can use a constant amount of additional memory.

(Basically you are designing an in-place QuickSelect.)
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 4:15am On Jan 30, 2012
ridgeman:
Truth is all the states should be given a timeline by which they must base their entire spending on what is generated within their states. Only then will Nigeria begin its march to real development!
Cosign.

10 years should be more than enough time
ProgrammingRe: Puzzle of the day by ektbear(op): 3:49am On Jan 30, 2012
Two more:

1) What is the sum of the #s from 1 to 1,000 (this is kind of a dumb question, you either will have seen the trick before or not. If you've not seen the trick before, try to think of a way to rearrange the summation to make it easier.)

2) What is the expected number of times I must flip a fair coin before I get two heads? (basically a conditional probability question)
ProgrammingRe: Algorithm Code To Rank Photos In Websites by ektbear: 3:44am On Jan 30, 2012
Pretty open-ended question. Rank by what metric?

Image size is easy.

Image "goodness" (whatever that would mean) is very arbitrary.

So what metric do you want?
PoliticsRe: Yaya Boni Defeats Gej To Become AU Chairman. by ektbear: 12:19am On Jan 30, 2012
Demdem:
If not for the continental cabals, the retardeen would have won. Spare him guys.
grin

On a serious note, it wasn't Nigeria's turn, was it? He reneged on the agreement.

This seems to be a habit with this dude. . .
CultureRe: How Far Back Can You Trace Your Ancestry? by ektbear: 12:16am On Jan 30, 2012
Not too far, unfortunately.
PoliticsRe: We Have Strong Links With Al Qaeda - Boko Haram. by ektbear: 4:12pm On Jan 29, 2012
werepeLeri:
“People were singing songs in [northern cities] Kano and Kaduna saying: ‘We want Boko Haram’,” Qaqa said, describing how the group can blend into the communities in which it operates.

"If the masses don’t like us they would have exposed us by now. When Islam comes everyone would be happy,” he said.
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 11:46am On Jan 29, 2012
So you don't plan on giving any evidence for this 70% figure.

Just state it as your own private speculation then, rather than anything fact based or measured.
PoliticsRe: New Au Headquarters Built & Funded By Chinese by ektbear: 11:43am On Jan 29, 2012
Outraged by what?

Chinese man is getting his hustle on. Get yours too rather than hating on him.
PoliticsRe: Demerits Of A Broken Nigeria. . . Funny But So True. by ektbear: 8:41am On Jan 29, 2012
You can get pretty damn good Mexican food in the US, yet they aren't one country.

Not sure if the OP is serious at all. . . .
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 8:30am On Jan 29, 2012
Pcicero: His rejoinder is not particularly effective. The quotes from him in the FT article were damning.
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 8:29am On Jan 29, 2012
hercules07:
@manny

80% of our foreign exports not 80% of all earnings, do you know how much Nigeria makes from VAT and other taxes alone? We are talking of GDP here and not foreign earnings.
The North contributes more than 1/3 as it has more than 70% share of the 45% in agriculture, note that 70% of 45% is already 31.5% of total, abeg let us say the truth when we see it.
Who told you that the North has more than a 70% share in agric?

The most valuable crop Nigeria produces is cocoa: http://www.bloomberg.com/news/2011-06-02/nigeria-s-cocoa-bean-exports-climbed-by-47-last-year-akingbola-says.html

That is ~$800 million in exports alone, not to mention whatever is consumed locally and the economic impact.

Which high value, profitable crop does the North produce for you to have gotten this 70% figure?
ProgrammingRe: Which Programming Language Should I Start With And Why? by ektbear: 8:25am On Jan 29, 2012
lordZOUGA:
@ekt_bear, depends on what u wanna do,
What do you mean?
ProgrammingRe: Can Obfuscated Php Script Be Decoded? by ektbear: 3:58am On Jan 29, 2012
If obfuscated, can't one just put it in code reformatter of some sort?

I don't see how that will help.
PoliticsRe: Nigeria Will Eventually Break Written By Femi Fani-kayode by ektbear: 1:17am On Jan 29, 2012
Nice writeup.
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 1:13am On Jan 29, 2012
Nashville:
It's like a married women telling her husband that "what is mine is mine and what is yours is ours". That is the mentality of the north. Share what belongs to others and keep the very little they have.
QFT!

Man. Perfect analogy. And this is why the rest of Nigeria wants to abandon this marriage.

manny4life:
No offense to you bro, but even the measurement itself still wouldn't give the North 33.33% of Nigeria's GDP, highly impossible, however, let me just give in a lil bit to the 1/3rd thing though I strongly object to it.
Nah: https://www.nairaland.com/nigeria/topic-667836.0.html

Given that the GDP/capita of the North is half that of the south, and they claim equal population, then they contribute ~1/3 to GDP. So at least based upon those numbers that is what they contribute. The reality might be much less though.
PoliticsRe: Core North Should Convert To Christianity To Save Nigeria, by ektbear: 12:46am On Jan 29, 2012
To me, religion is a tool. If it makes your people strong and prosperous, you keep it.

If it fails your people, then you look for something new.

My ancestor in 1907ish abandoned his traditional religion because it didn't serve him as well as Christianity did.

PointB shouldn't really have to be the one telling them to think hard about whether their culture and religion has served them well.

How can you rule a country for 40+ years and at the end of the process be far poorer than those you ruled? In fact only 1/2 as wealthy, far less educated, higher mortality rates, etc?

Clearly something is wrong.

Now obviously I should not blame Islam alone for it.

But they need to ask themselves (honestly), "has our culture and religion served us well over the past few years?"
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 12:36am On Jan 29, 2012
1/3rd is probably too high. But at least that # is based upon some measurements. Absolutely no clue where @hercules07 got 50% from.

If they had a GDP 50% of Nigeria, they'd have split this country immediately after GEJ won grin
PoliticsRe: Core North Should Convert To Christianity To Save Nigeria, by ektbear: 12:30am On Jan 29, 2012
Why not just split the country? Let them keep and enjoy their religion and practice it any way they desire.
`
4 wives, almajiri school, Islam as the law of the land, Sharia law, stoning people to death for adultery, whatever else, fine by me.

I don't have a problem with this, so long as I am not negatively affected by it.

What does the Bible sef say. . . "do not be unequally yoked."

So you can try to create a fake national common denominator that is antithetical to the culture of some, or simply decide to shake hands and part ways. I don't see why the latter is so unpalatable to you.
PoliticsRe: Core North Should Convert To Christianity To Save Nigeria, by ektbear: 12:15am On Jan 29, 2012
PointB:
@Ekt_bear,
Not forcing anyone to convert to Christianity. Just felt that Christians generally are less prone to suicide bombing and terrorism compared to Muslims. And if this is the case, shouldn't we prescribe it as solution to some of our national problem? Just some thought in the spirit of absurdity!
I do think that Christianity as a religion and culture is overall far superior to Islam. Less fanaticism, more compatible with education, industrialization, modernization, progress for women, etc. All that good stuff.

At the same time, this is kind of a ridiculous solution. Nobody wants to give up his religion, any more than he'd like to give up his language, culture, etc.

Besides, I don't think Nigeria breaking up is the worst thing in the world.
PoliticsRe: Core North Should Convert To Christianity To Save Nigeria, by ektbear: 11:45pm On Jan 28, 2012
Heh. The Holy Trinity stuff I must admit seemed pretty weird (and complicated) to me too.

I can see why some might be uncomfortable with it grin

Anyway, I don't think this is a good idea. . . live and let live.

Isn't by force to be Christian, or even believe in God period.
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 11:05pm On Jan 28, 2012
Read the link I posted. It will take you under 5 minutes.

Nowhere near 50%.
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 10:49pm On Jan 28, 2012
If Northern Nigeria contributed 50% to Nigeria's GDP, then do you think they'd care whether the country splits or not?

Would you see guys like ndu_chuks scared sh1tless of the country splitting?

Immediately when you heard/came up with that #, you should have realized it was wrong.
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 10:47pm On Jan 28, 2012
You know yourself that the North doesn't contribute anywhere close to 50% of GDP.

Where on earth did you get that # from? undecided

Heck, I thought we already discussed this earlier this month: https://www.nairaland.com/nigeria/topic-845209.0.html#msg9957618
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 10:36pm On Jan 28, 2012
Also, the north contributes roughly 1/3rd of GDP. That isn't particularly high, given the roughly 50% of population they claim.
PoliticsRe: Sanusi Links Boko Haram To "oil Derivation". by ektbear: 10:34pm On Jan 28, 2012
You misunderstood my statement if you read it to mean I think that all black people are X, Y or Z.

Anyway, if you contribute a high percentage of GDP, then you should be able to take care of yourself financially without handouts from someone else, to the point where you are blaming terrorism on it.

After all, only a small # of states produce oil.

Yet do we see all non oil-producing states hotbeds of terrorism?

1 2 3 4 5 6 7 8 ... 203 204 205 206 207 208 209 210 211 (of 485 pages)