本文整理汇总了C#中SinglyLinkedLists.SinglyLinkedList.IsSorted方法的典型用法代码示例。如果您正苦于以下问题:C# SinglyLinkedList.IsSorted方法的具体用法?C# SinglyLinkedList.IsSorted怎么用?C# SinglyLinkedList.IsSorted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SinglyLinkedLists.SinglyLinkedList
的用法示例。
在下文中一共展示了SinglyLinkedList.IsSorted方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsSortedOnSortedList
public void IsSortedOnSortedList()
{
SinglyLinkedList list = new SinglyLinkedList("bar", "foo");
Assert.IsTrue(list.IsSorted());
}
示例2: IsSortedOnUnsortedList
public void IsSortedOnUnsortedList()
{
SinglyLinkedList list = new SinglyLinkedList("foo", "bar");
Assert.IsFalse(list.IsSorted());
}
示例3: IsSortedOnEmptyList
public void IsSortedOnEmptyList()
{
SinglyLinkedList list = new SinglyLinkedList();
Assert.IsTrue(list.IsSorted());
}
示例4: IsSortedOnListOfDuplicates
public void IsSortedOnListOfDuplicates()
{
SinglyLinkedList list = new SinglyLinkedList("foo", "foo");
Assert.IsTrue(list.IsSorted());
}
示例5: IsSortedOnSingleItemList
public void IsSortedOnSingleItemList()
{
SinglyLinkedList<string> list = new SinglyLinkedList<string>("foo");
Assert.IsTrue(list.IsSorted());
}
示例6: IsSortedOnLargerUnsortedList
public void IsSortedOnLargerUnsortedList()
{
SinglyLinkedList list = new SinglyLinkedList("bar", "grille", "foo", "apple");
Assert.IsFalse(list.IsSorted());
}
示例7: IsSortedOnUnsortedMultipleItemList
public void IsSortedOnUnsortedMultipleItemList()
{
SinglyLinkedList list = new SinglyLinkedList("foo", "boo", "apple");
Assert.IsFalse(list.IsSorted());
}
示例8: IsSortedOnSortedMultipleItemList
public void IsSortedOnSortedMultipleItemList()
{
SinglyLinkedList list = new SinglyLinkedList("apple", "bar", "foo");
Assert.IsTrue(list.IsSorted());
}
示例9: IsSortedOnSortedLongerList
public void IsSortedOnSortedLongerList()
{
SinglyLinkedList list = new SinglyLinkedList("abc", "bar", "def", "foo", "zoo");
Assert.IsTrue(list.IsSorted());
}
示例10: IsSortedOnLongerUnsortedList
public void IsSortedOnLongerUnsortedList()
{
SinglyLinkedList list = new SinglyLinkedList("foo", "bar", "cat", "ark");
Assert.IsFalse(list.IsSorted());
}
示例11: IsSortedOnLongerListWithDuplicates
public void IsSortedOnLongerListWithDuplicates()
{
SinglyLinkedList list = new SinglyLinkedList("bar", "bar", "foo", "grille");
Assert.IsTrue(list.IsSorted());
}