惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyberwarzone
Cyberwarzone
V
Vulnerabilities – Threatpost
T
Tenable Blog
Forbes - Security
Forbes - Security
Simon Willison's Weblog
Simon Willison's Weblog
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
S
Securelist
C
Cybersecurity and Infrastructure Security Agency CISA
Project Zero
Project Zero
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Visual Studio Blog
WordPress大学
WordPress大学
Latest news
Latest news
K
Kaspersky official blog
T
Tailwind CSS Blog
T
Threat Research - Cisco Blogs
B
Blog RSS Feed
C
Cisco Blogs
博客园 - 聂微东
Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss
小众软件
小众软件
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
Stack Overflow Blog
Stack Overflow Blog
罗磊的独立博客
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Privacy International News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
S
SegmentFault 最新的问题
Security Latest
Security Latest
Y
Y Combinator Blog
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
P
Privacy & Cybersecurity Law Blog
L
LINUX DO - 最新话题
月光博客
月光博客
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
S
Security Affairs
P
Proofpoint News Feed
D
DataBreaches.Net
有赞技术团队
有赞技术团队
云风的 BLOG
云风的 BLOG

博客园 - gyhanonline

Function Point in Vbscript Window API in QTP Simulate click event using widows API. Static Constructor A Go Set program A Go Set program About Inherit Code for Inter-process communicate Integrity Level Test for publish blog by word 2007 托管为什么安全 The usage of intellisense in Vs .net 2005 我的面试(七) 关于singlton的一些问题 我的面试(六) 我的面试(四)补充1 我的面试(四) 我的面试(三) 我的面试(二)
我的面试(五)
gyhanonline · 2007-10-01 · via 博客园 - gyhanonline

八月十五中秋佳节,俺再一次赶赴北京。为我的北漂奔波!足足用了一天的时间,晚上11点才回到家。
这家公司在上地,好远。做的题和以前面试做的差不多不想再赘述了。当一件事情干过n次之后就趋于麻木,我现在对于面试这件事情就是在麻木的临界状态。不想那么多了。慢慢来吧!
这次是测试工程师,不知道能不能行!面试官说就剩下跟我谈薪水问题了。等等吧,如果一个公司连5K都拿不出来,这样的公司也不用去了。
出道题数组a[0,1……n-1]中的数是乱序,有数b[0,1……m],m<n,不新建数组把a中数升序放到b中,编吧。

       /// <summary>
        
/// 数组排序
        
/// </summary>
        
/// <param name="a1">带排序数组</param>
        
/// <param name="lenth">排序后新数组长度</param>
        
/// <returns>排完的数组</returns>

        static int[] SortArray(int[] a1, int lenth)
        
{
            
if (lenth < a1.Length)
            
{
                
throw new Exception("越界了,甭玩儿啦!");
            }

            
int[] b1 = new int[lenth];
            b1[
0= a1[0];
            
for (int i = 1; i < a1.Length; i++)
            
{

                
int low = 0;
                
int high;
                
if (i <= lenth - 1)
                
{
                    high 
= i - 1;
                }

                
else if (a1[i] > b1[lenth-1])
                
{
                    
continue;//都比最大的大了,还玩啥?!
                }

                
else
                
{
                    high 
= lenth - 1;
                }

                
while (low <= high)
                
{
                    
int mid = (low + high) / 2;
                    
if (a1[i] < b1[mid]) high = mid - 1;
                    
else low = mid + 1;
                }
//找出来往哪插
                if (i <= lenth - 1)
                
{
                    
for (int j = i - 1; j >= high + 1; j--)
                        b1[j 
+ 1= b1[j];
                }

                
else
                
{
                    
for (int j = lenth - 2; j >= high + 1; j--)
                        b1[j 
+ 1= b1[j];
                }
//腾地方,把插入点后边的向后挪。(满了的最后一个就不要了)
                b1[high+1= a1[i];//都给您老腾地儿了还不赶快进去!
            }

            
return b1;//得,打完收工。
        }
//看不懂的去看《数据结构》的插入排序法