zoukankan      html  css  js  c++  java
  • Shortest distance between two arrays

    Given two sorted array in non-descending order, each contains positive integers
    The distance is define as following
    pick up a number from each array, compute their difference
    return the shortest distance among them-that's the distance between the two arrays
    example
    int[] a = {1, 3, 5, 7 , 9} ;
    int[] b = {2, 4, 8} ;
    The result is 1

    Code
  • 相关阅读:
    流程图
    如何撰写简历
    产品经理-visio
    关于 EF 对象的创建问题
    LINQ To EF
    IQueryable 与 IEnumberable 接口的区别
    UWP自动填充控件AutoSuggestBox小优化
    xamarin UWP证书问题汇总
    xamarin UWP中MessageDialog与ContentDialog的区别
    xamarin UWP自定义圆角按钮
  • 原文地址:https://www.cnblogs.com/graphics/p/1498122.html
Copyright © 2011-2022 走看看