我想知道为什么这段代码甚至没有输出或奇数我需要三元操作后添加的readline声明 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace tenary
{
class Progr
我想在字符串数组上进行三元搜索。我已经获得了大部分代码,并且我认为我正走在正确的轨道上,但似乎无法获得除-1之外的任何结果。以下是我到目前为止所生成的代码。我知道问题出在搜索算法中。我不想使用任何内置的,因为我正在学习。 public static void main(String[] args) {
//declare a string array with initial size