[Huawei machine trial exercise questions] 16. Digital statistics, Huawei exercises
Question
Title: for the input integer array, the number of maximum, maximum, minimum, and minimum values in the output array element. Detailed Description: Interface Description prototype: voidOutputMaxAndMin (int * pInputInteger, intInputNum, int * pMaxValue, int * pMaxNum, int * pMinValue, int * pMinNum); input parameter:
[Huawei machine trial exercise] 5. IP address determination validity, Huawei 5.ip
Question
Determines whether the input string is a valid IP address.
Detailed description:
Implement the following interface:BoolisIPAddressValid (constchar * pszIPAddr)Input: pszIPAddr stringOutput: valid IP addresses of true, invalid IP addresses of false
Constraints
The input IP address is in the format of XXX. XXX.The two
[Huawei machine trial] 67. parity in the seat, Huawei parity
Question
Code
/* ------------------------------------- * Date: 2015-07-07 * Author: SJF0115 * Subject: parity seat * Source: huawei machine trial question ----------------------------------------- */# include
Copyright Disclaimer: This article is an original article by the blogger and cannot be repr
[Huawei machine trial] 70. Apple, Huawei
Question
The number of ways in which M of identical apples are put in N identical baskets. 1
Ideas
Set f (m, n) to m apples and the number of n plates to be placed:
Description of recursive exit conditions:
When n = 1, all the apples must be placed on one plate, so 1 is returned. When no apple can be placed, 1 is defined as a PUT method. There are two recursive pat
Some of Huawei's real machine debugging cannot solve the problem of displaying logs. Huawei's log
During real machine testing, some Huawei mobile phones cannot obtain all log information. Or you cannot obtain the log information below the Error level. For example, P7
This is because some Huawei servers set the factory log to off by default, so they can only obtain log information at the Error level or abo
A lot of friends reflect Huawei P6 mobile phone battery is not durable, endurance is too short, although Huawei P6 battery capacity is only 2000mAh, but in fact, enough users to use the day. This article for everyone to bring Huawei P6 some of the skills, summed up the phone in the energy-saving aspects of the use and setting skills, hope to help everyone.
1, do
Huawei machine question 1, Huawei machine questionQuestion 1: Question description (60 points): enter a string of lower-case letters (~ Z. Compile a character string filter program. If multiple identical characters appear in the string, filter out non-first-time characters. For example, the "abacacde" character string is "abcde ". Required implementation function: void stringFilter (const char * pInputStr,
Huawei machine question 2, Huawei machine questionQuestion 2: Question description (40 points): enter a string of lower-case letters (~ Z. Compile a character string compression program to compress duplicate letters that are present continuously in the string and output the compressed character string. Compression rules: 1. Only the characters that appear repeatedly are compressed. For example, because the
Routine maintenance tutorial for Huawei switches and routine maintenance for Huawei Switches
View the current port traffic on the vswitch:
Display interface Ethernet brief | include up
Speed limit on ports:
Interface GigabitEthernet 0/0/14
Qos lr inbound cir 8192 // The guaranteed bandwidth entered on this port is 8 Mbit/s.
Qos lr outbound cir 8192 // configure the bandwidth of this port to 8 Mbit/s
Method One: Combination key
We click on the screenshot screen "power button" + "Volume down key" can quickly achieve screenshots, screenshots photos saved in the phone album.
Method Two: Shortcut switch
Open Huawei Glory Note8 need screenshots of the interface, drop the notification bar, and then click on the "Switch"-"screenshot" can be a quick screenshot.
Method Three: Refers to the joint cutting screen
Huawei test-Child string separation and Huawei string Separation
Description:Input any string sequence through the keyboard. The string may contain multiple substrings separated by spaces. Compile a program to automatically separate the substrings and separate them with commas (,). At the end, add a comma (,) and store the substrings.If "abc def gh I d" is input, the result will be abc, def, gh, I, d,Requir
Huawei machine trial-N queen problem (Advanced question 160 points: Two backtracking methods to solve vomiting blood sorting), Huawei 160 points
I. Problem description: Place n queens that are not under attack on the chessboard of n × n grids. According to the rules of chess, the queen can attack pawns in the same row, column, or diagonal line. The problem after n is equivalent to placing n queens on the n
Huawei trial-string replacement (aa-bc), Huawei aa-bc
The input string (the string only contains lowercase letters 'A' to 'Z') is output after cyclic conversion according to the following rules: a-> B, B-> c ,..., Y-> z, z-> a; if the input string contains two letters in a row, the last letter must be converted twice in a row. For example, if aa is converted to bc, zz is converted to AB. If there are more
Huawei trial-string replacement (aa-bc), Huawei aa-bc
The input string (the string only contains lowercase letters 'A' to 'Z') is output after cyclic conversion according to the following rules: a-> B, B-> c ,..., Y-> z, z-> a; if the input string contains two letters in a row, the last letter must be converted twice in a row. For example, if aa is converted to bc, zz is converted to AB. If there are more
Huawei trial-extract digital sorting, Huawei extract digital sorting
Enter a string, extract the numbers, and sort the output.
# Include
Test results may be incomplete. Check for missing information:
Huawei trial-the most frequently-used element in the integer array, Huawei integer
Retrieve the elements that appear most frequently in an integer array and return them in ascending order.
Implementation Method:Public static int [] calcTimes (int [] num, int len );
[Input] num: an integer array;
Len: Number of Integers[Return] returns the most frequently-occurring elements in an integer array in ascendin
Huawei device trial-remove the maximum and minimum values and then the remaining number. Huawei minimum values
Enter a string of numbers separated by commas (,), and remove the remaining number after the maximum and minimum values of all output numbers. (The maximum and minimum values may have multiple values)
Sample input: 3, 3, 5, 3, 6, 9, 7, 9
Sample output: 3
# Include
Test data: 3,3, 5,3, 6
Huawei trial-name of husband and wife, Huawei name of husband and wife
Question: Husband and Wife
In China, most people use the word "Husband and Wife ". The so-called "Husband and Wife" means that two people seem to be perfect, and there are some similarity in appearance, body, and other aspects.
This question is another way to find the most "Husband and Wife" from the perspective of human name and the nu
Huawei trial-elements sorted by parity (pyramid) and Huawei parity
Question: elements are sorted by parity
Given an array input [], if the array length n is an odd number, place the largest element in the array in the middle of the output [] array,
If the array length n is an even number, place the largest element in the array to the right position in the middle of the output [] array,
Then, in the order of
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.