mostyfriedman's Profile
Reputation: 674
Enlightened
- Group:
- Expert w/DIC++
- Active Posts:
- 4,349 (2.61 per day)
- Joined:
- 24-October 08
- Profile Views:
- 33,942
- Last Active:
May 01 2013 10:14 PM- Currently:
- Offline
Previous Fields
- Country:
- EG
- OS Preference:
- Linux
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- Playstation
- Your Car:
- Chevrolet
- Dream Kudos:
- 625
- Expert In:
- Learning
Latest Visitors
-
macosxnerd101 
01 May 2013 - 22:29 -
modi123_1 
20 Apr 2013 - 21:11 -
xssvgamer 
16 Mar 2013 - 05:38 -
raghav.nagana... 
11 Feb 2013 - 04:42 -
bradleycmetz 
25 Jan 2013 - 13:45
Posts I've Made
-
In Topic: O(n log n) Problem
Posted 15 Apr 2013
If you have to use a binary tree, then
1) first sort the vector.
2) Get the median, and insert it as the root of your tree.
3) Insert the rest of the elements.
The left part of the tree will correspond to the bad team, the right part will correspond to the good team, and the root can be either depending on if it's the n/2 or n/2-1 element. -
In Topic: O(n log n) Problem
Posted 15 Apr 2013
I suppose a team is an array of ints where each int specifies the skill level of a player. Initially you will have an array of 2n elements, and to make the teams unfair, you want to divide the array in such a way that the best player of the weak team has a skill level that is the same or less than the skill level of the worst player of the better team. You can sort the array first which will take O(n lg n), and then treat the first half of the array as the first team, and 2nd half as the 2nd team.
EDIT: Skydiver beat me to it. -
In Topic: New to Java- implementation question
Posted 25 Jan 2013
Can you post a sample of how the input should look like? -
In Topic: New to Java- implementation question
Posted 25 Jan 2013
try using next() instead of nextLine() to read the string -
In Topic: New to Java- implementation question
Posted 25 Jan 2013
public static void main(String[]args) { Cipher cipher = new Cipher(); cipher.run(); }
My Information
- Member Title:
- The Algorithmi
- Age:
- 24 years old
- Birthday:
- April 15, 1989
- Gender:
-
- Location:
- Cairo, Egypt
- Interests:
-
Analysis and design of Algorithms
Theory Of Computation
Recursion
recreational mathematics
functional programming
Artificial Intelligence - Full Name:
- Mostafa Hany El Sayed
- Years Programming:
- 4
- Programming Languages:
- Java, Python, Ruby, Prolog, Haskell (learning), common lisp, C/C++, MySql, MSSQL, verilog hdl
Contact Information
- E-mail:
- Click here to e-mail me
- MSN:
-
mostyfriedman@gmail.com
- Website URL:
-
http://
- Facebook:
- https://www.facebook.com/MostyFriedman
- Twitter:
- Cryptogrammer
Friends
-

absynthe
-

skyhawk133
-

Core
-

baavgai
-

PsychoCoder
-

SixOfEleven
-

Locke
-

pbl
-

NickDMax
-

born2c0de
-

gabehabe
-

OliveOyl3471
-

Raynes
-

KYA
-

ayman_mast...
-

nano-gilmour
-

Gloin
-

Dogstopper
-

xor-logic
-

Pipey85
-

Martyn.Rae
-

m-e-g-a-z
-

carltech
-

TriggaMike
-

macosxnerd101
-

williamgeo...
-

kavitamaurya
-

Autocrat
-

BrainTuner
-

zero_cool1
-

MythTracker
-

mon mon
-

Martyr2
-

Bent al-Yemen
-

Elcric
-

ENG.Rehab
-

hdr
-

rexsam99
-

captainham...
-

Shahrzzad
-

Dean_Grobler
-

fille
-

assert(C)
-

nowayymann
-

amture106
-

Basma Zeyada
-

ButchDean
-

Javacodes
-

kimNeedHelp
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
no2pencil
21 Nov 2011 - 21:04Martyr2
01 Feb 2011 - 23:06red_4900
01 Feb 2011 - 01:45absynthe
28 Jan 2011 - 22:18Dogstopper
03 Jan 2011 - 00:15skyhawk133
31 Dec 2010 - 13:59Alex6788
15 Nov 2010 - 23:07Bent al-Yemen
19 Aug 2010 - 02:07megglz
11 Aug 2010 - 05:21absynthe
11 Aug 2010 - 05:17megglz
11 Aug 2010 - 04:40Bent al-Yemen
10 Aug 2010 - 10:14!!!!!!!!!?
Bent al-Yemen
03 Aug 2010 - 17:38Bent al-Yemen
03 Aug 2010 - 17:29Bent al-Yemen
03 Aug 2010 - 10:21how r u brother Mustafa? i hope u r doing great .i have finished my exams , and i'll come back to this forum to get high reputation like u. d: :)