January 2012
Intermediate to advanced
396 pages
8h 16m
English
Follow the given steps:
foreach (T element in inputSequence)
{
buffer.Push(element);
}
Count() and ElementAt()
are extension methods and are available at System.Linq namespace in .NET Framework 3.5 and above. You can get it with Visual Studio 2008 and above. So please include that namespace:
for (int i = 0; i < inputSequence.Count(); i++)
{
if(buffer.Pop().CompareTo(inputSequence.ElementAt(i))==0)
continue;
else
return false;
}Make sure you retain the last return true; statement.
Main() method with the following:static void Main(string[] args) { //Checking ...Read now
Unlock full access