mostyfriedman's Profile User Rating: *****

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:
User is offline 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

Icon   mostyfriedman knows nothing about anything

Posts I've Made

  1. 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.
  2. 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.
  3. In Topic: New to Java- implementation question

    Posted 25 Jan 2013

    Can you post a sample of how the input should look like?
  4. In Topic: New to Java- implementation question

    Posted 25 Jan 2013

    try using next() instead of nextLine() to read the string
  5. 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:
MSN  mostyfriedman@gmail.com
Website URL:
Website URL  http://
Facebook:
https://www.facebook.com/MostyFriedman
Twitter:
Cryptogrammer

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    no2pencil Icon

    21 Nov 2011 - 21:04
    Wow, have not seen you in a while?! Things good?
  2. Photo

    Martyr2 Icon

    01 Feb 2011 - 23:06
    Sounds like Hosni Mubarak may step down now. I hope he keeps his word. But you can never trust a dictator! :)
  3. Photo

    red_4900 Icon

    01 Feb 2011 - 01:45
    Seriously dude, don't go back to Egypt right now. It's a mess.
  4. Photo

    absynthe Icon

    28 Jan 2011 - 22:18
    I hope you are safe my friend! I'm thinking of you and hoping all is well! Don't pick up any rocks please..
  5. Photo

    Dogstopper Icon

    03 Jan 2011 - 00:15
    Hope you had a good New Year's day Mosty!
  6. Photo

    skyhawk133 Icon

    31 Dec 2010 - 13:59
    You too man! Hope 2011 is a good year for you! Glad to have you here at DIC.
  7. Photo

    Alex6788 Icon

    15 Nov 2010 - 23:07
    Hey mostyfriedman
  8. Photo

    Bent al-Yemen Icon

    19 Aug 2010 - 02:07
    looool, i don't know , i just got used to do so.
  9. Photo

    megglz Icon

    11 Aug 2010 - 05:21
    probably!
  10. Photo

    absynthe Icon

    11 Aug 2010 - 05:17
    whats up sexy? :)
  11. Photo

    megglz Icon

    11 Aug 2010 - 04:40
    hi! ive been here a while ^_^
  12. Photo

    Bent al-Yemen Icon

    10 Aug 2010 - 10:14
    Ramdan Kareem ...
    !!!!!!!!!?
  13. Photo

    Bent al-Yemen Icon

    03 Aug 2010 - 17:38
    looool, yeah, hundreds.
  14. Photo

    Bent al-Yemen Icon

    03 Aug 2010 - 17:29
    i do ...but how did u know that??!!
  15. Photo

    Bent al-Yemen Icon

    03 Aug 2010 - 10:21
    salam
    how 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: :)
  • (2 Pages)
  • +
  • 1
  • 2