In general, the simplest methods are the best. For example:
public static int search(int arr[], int x)
{
int n = arr.length;
for (int i = 0; i < n; i++)
{
...
Type: Posts; User: hp3k
In general, the simplest methods are the best. For example:
public static int search(int arr[], int x)
{
int n = arr.length;
for (int i = 0; i < n; i++)
{
...