Golang Engineer Interview Fourth day

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed. **1**. There are n categories of products in the mall, from high to low by price, if the same price is sorted by production date, the price is reserved after the decimal point two "' Gopackage mainimport (" FMT ") type shop struct {price float32date String}func Main () {shops: = []shop{{1, "222"}, {7, "222"}, {3, "222"},{4, "222"}, {5, "2018/1/21"}, {5, "2018/1/20"},{5, "2018/1/16"},{5, "2018/1/19"}} num: =len (Shops)//By Price bubble sort the goods from low to high, if the price is the same, judging the date, by the early to late sort for i:=0;i<num;i++ {for J: =i+1;j<num;j++ {ifshops[i]. Price >shops[j]. price{Shops[i],shops[j] =shops[j],shops[i]}else if shops[i]. Price ==shops[j]. Price{if Shops[i]. Date >shops[j]. Date {shops[i],shops[j] =shops[j],shops[i]}}}}fmt. Println (Shops)} "**2**. Invert the string around the Mirror" ' Gopackage mainimport ("FMT") func main () {str: = "abcdef" runes: = []rune (str) L: = Len (runes) for I, J: = 0, L; I < J; I, j = i+1, j-1 {runes[i], runes[l-1-i] = Runes[l-1-i], runes[i]fmt. Println (String (runes)}} "" **3**. Talk about the understanding of the Beego framework, how the route is going, beego the idea of design, **4**. The idea of Beego is well known bee function **5**. A brief description of the channel, Goroutine and interface in go, requiring familiarity with the underlying source **6** learn some microservices 641 reads  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.