Finding the busiest time-frame in a parking lot
Naming Conventions

MSDN, General Naming Conventions


DO NOT use Hungarian notation:


[dt]Start in getPickTimeframe() --> DateTime currentFrameStartDate
[dt]End in getPickTimeframe() --> DateTime currentFrameEndDate

DO favor readability over brevity:


ParkedCar --> ParkingLog
getPickTimeframe(List&lt;ParkedCar&gt; [cars]) --> GetPeakTimeFrame(List&lt;ParkingLog&gt; parkingLogs)
public int [countCars]; --> public int TotalNumberOfParkedCars;
int [count] = 0; --> int currentFrameNumberOfParkedCars;


MSDN, Naming Guidelines / Capitalization Conventions
DO use PascalCasing for all public member, type, and namespace names consisting of multiple words:


[G]et[Pick]Time[F]rame() --> GetPeakTimeFrame()
class ParkTime[F]rame
ParkTime[F]rame.[S]tartTime
ParkTime[F]rame.[E]ndTime
ParkTime[F]rame.[C]ountCars --> Also see above for alternative name
ParkedCar.[A]rrivalTime
ParkedCar.[L]eavingTime



Implementation

Your current implementation, besides efficiency, is not working correctly.

For parkings as the following:

// Parking opens at 07:00
DateTime parkingOpenDate = DateTime.Now.Date.AddHours(7);

// t --xxxxxxxx--------------------------------07:02 - 07:10
// t ---xxxxxxxx-------------------------------07:03 - 07:11
// t --------------xxxxxxxx--------------------07:14 - 07:22
// t --------xxxxxxxxx-------------------------07:08 - 07:17
// t 001222223321112221111100000000000000000000

new ParkingLog[]
{
    new ParkingLog() { ArrivalTime = parkingOpenDate.AddMinutes(2), LeavingTime = parkingOpenDate.AddMinutes(10) },
    new ParkingLog() { ArrivalTime = parkingOpenDate.AddMinutes(3), LeavingTime = parkingOpenDate.AddMinutes(11) },
    new ParkingLog() { ArrivalTime = parkingOpenDate.AddMinutes(14), LeavingTime = parkingOpenDate.AddMinutes(22) },
    new ParkingLog() { ArrivalTime = parkingOpenDate.AddMinutes(8), LeavingTime = parkingOpenDate.AddMinutes(17) }
}


It should output

07:08.00 - 07:10:00 with 3 cars


However, it outputs:

07:02.00 - 07:10:00 with 2 cars


Here are my changes to the code, calculating the correct peak time frame, only assuming the LeavingDate of each ParkingLog (ParkedCar in your source) is greater than the ArrivalDate:

public class _113182
{
    private SortedList&lt;DateTime, int&gt; carParkCapacityTracker = new SortedList&lt;DateTime, int&gt;();

    public class ParkingTimeFrame
    {
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public int TotalNumberOfParkedCars { get; set; }

        public override string ToString()
        {
            return string.Format("{0:HH:mm.ss} - {1:HH:mm:ss} | #Cars: {2}", StartTime, EndTime, TotalNumberOfParkedCars);
        }
    }

    public class ParkingLog
    {
        public DateTime ArrivalTime { get; set; }
        public DateTime LeavingTime { get; set; }

        public override string ToString()
        {
            return string.Format("{0:HH:mm:ss} - {1:HH:mm:ss}", ArrivalTime, LeavingTime);
        }
    }

    private void TrackCarParkingAction(DateTime actionDate, int actionEffect)
    {
        if (!carParkCapacityTracker.ContainsKey(actionDate))
        {
            carParkCapacityTracker.Add(actionDate, actionEffect);
        }
        else
        {
            carParkCapacityTracker[actionDate] += actionEffect;
        }
    }

    private void TrackCarParkingAction(ParkingLog parkingLog)
    {
        TrackCarParkingAction(parkingLog.ArrivalTime, +1);
        TrackCarParkingAction(parkingLog.LeavingTime, -1);
    }

    public ParkingTimeFrame GetPeakTimeFrame(List&lt;ParkingLog&gt; parkingLogs)
    {
        carParkCapacityTracker.Clear();

        parkingLogs.ForEach(TrackCarParkingAction);

        int currentNumberOfParkedCars = 0;
        int maximumNumberOfParkedCars = 0;
        int maximumCapacityFrameOffset = 0;

        for (int currentFrameOffset =  0; currentFrameOffset &lt; carParkCapacityTracker.Count; currentFrameOffset++)
        {
            currentNumberOfParkedCars += carParkCapacityTracker.Values[currentFrameOffset];
            if (maximumNumberOfParkedCars &lt;= currentNumberOfParkedCars)
            {
                maximumNumberOfParkedCars = currentNumberOfParkedCars;
                maximumCapacityFrameOffset = currentFrameOffset;
            }
        }

        return new ParkingTimeFrame()
        {
            StartTime = carParkCapacityTracker.Keys[maximumCapacityFrameOffset],
            EndTime = carParkCapacityTracker.Keys[maximumCapacityFrameOffset + 1],
            TotalNumberOfParkedCars = maximumNumberOfParkedCars
        };
    }
}


And here is the code to test it:

public static void Main()
{
    Console.WriteLine("Enter to start..");
    Console.ReadLine();

    // Parking opens at 07:00
    DateTime parkingOpenDate = DateTime.Now.Date.AddHours(7);

    List&lt;ParkingLog&gt; parkingLogs = new List&lt;ParkingLog&gt;
    (
        // t --xxxxxxxx--------------------------------07:02 - 07:10
        // t ---xxxxxxxx-------------------------------07:03 - 07:11
        // t --------------xxxxxxxx--------------------07:14 - 07:22
        // t --------xxxxxxxxx-------------------------07:08 - 07:17
        // t 001222223321112221111100000000000000000000

        new ParkingLog[]
        {
            new ParkingLog() { ArrivalTime = parkingOpenDate.AddMinutes(2), LeavingTime = parkingOpenDate.AddMinutes(10) },
            new ParkingLog() { ArrivalTime = parkingOpenDate.AddMinutes(3), LeavingTime = parkingOpenDate.AddMinutes(11) },
            new ParkingLog() { ArrivalTime = parkingOpenDate.AddMinutes(14), LeavingTime = parkingOpenDate.AddMinutes(22) },
            new ParkingLog() { ArrivalTime = parkingOpenDate.AddMinutes(8), LeavingTime = parkingOpenDate.AddMinutes(17) }
        }
    );

    // Should output 07:08 - 07:10 with 3 cars
    Console.WriteLine("{0}", new _113182().GetPeakTimeFrame(parkingLogs));
}


Edit:

The OP told me that he tested the code and the code failed.

I tested it with the same input (as documented in the question by the OP) and it produced the correct result:

public static void Main()
{
    // According to the data provided by the OP
    // 10:10, 11:10
    // 10:30, 12:40 
    // 10:25, 11:10
    // 11:10, 12:20

    //       10:00    10:10    10:25    10:30    11:10    12:20    12:40    
    // CAR 1            xxxxxxxxxxxxxxxxxxxxxxxxxxx
    // CAR 2                              xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    // CAR 3                     xxxxxxxxxxxxxxxxxx
    // CAR 4                                       xxxxxxxxxx

    // The peak time frame should be: 10:30 - 11:10 with 3 cars:

    List&lt;ParkingLog&gt; parkingLogs = getParkedCars();
    Console.WriteLine("{0}", new _113182().GetPeakTimeFrame(parkingLogs));
}


Output:

10:30.00 - 11:10:00 | #Cars: 3


Edit 2:

The OP provided new test data and asserted that the code fails with this data.

Here is my test, and it works as expected, or there is something wrong and we are not on the same page:

// According to the new data provided by the OP
//09:00, 15:00
//10:10, 11:10
//10:30, 12:40
//10:35, 11:20
//10:25, 11:10
//11:10, 12:20

//       09:00    10:10    10:25    10:30    10:35    11:10    11:20    12:20    12:40    15:00
// CAR 1   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// CAR 2            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// CAR 3                              xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// CAR 4                                       xxxxxxxxxxxxxxxxxxx
// CAR 5                     xxxxxxxxxxxxxxxxxxxxxxxxxxxx
// CAR 6                                                xxxxxxxxxxxxxxxxxxx

// The peak time frame should be: 10:35 - 11:10 with 5 cars:

List&lt;ParkingLog&gt; parkingLogs = getParkedCars();
Console.WriteLine("{0}", new _113182().GetPeakTimeFrame(parkingLogs));


And the output is:

10:35.00 - 11:10:00 | #Cars: 5