注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
做完OA,回馈地里发一下OA总结的题目。Math Questions1. 3 24-168 1008 -5040, what’s the next number? (20160) 2. Amagic tree, double the height every day, the tree is 80 on 10th day,on which day the tree is 20 height? (8th day) 3. Twosoftware developers coming out from No. 1 office and No. 106 office with theconstant speed. The developer in No.1 office crosses 5 offices per min, theother one passes 10 offices per min. In which number of office they will meetwith each other? (36) 4. Twocoins worth 55 cents, one is not nickel (5 cents), what are the values of twocoins? (5 & 50) 5. Fillin the blank, 4 7 13 __ 49 97 (25) 6. One goatclimbs the cliff, the cliff is 60.5 inches height, the goat climbs 3 inch permin then falls 2 inches. How many times that goat could get to the top? (59) 7. Thecompany has 50,000 check, and 500 cash. They use cash to buy 150 stamps whicheach of them is 44 cents. They also bought 2 computers, each of them is 2025dollars. 1/15 of the computer expenses was paid by cash, and 1/10 is paid bycash. After that, they use check paid four employees’ weekly payment, theannual income of each employee is 26,000 dollars and there are 52 weeks peryear. What’s the value of cash and check? (cash:164, check:47595) 8. Apple= 40 cents, banana = 60 cents, grapefruit = 80 cents, what’s the value of pear?(40) 9. Ifone and half teenagers eat one and a half pizzas in one and a half days, howmany pizzas can 9 teenagers eat in 3 days? (18) 10. A man goes to a hardware shop and asks forprice of an item. The shop keeper replies that the iteam is one for $1. The mangives the shop keeper $3 for 600. What did the man buy for his newly paintedhouse? (House number) 11. You have three kinds of magazines, all buttwo are Times, all but two are Science, all but two are Nature. How manymagazines in total do you have? (3) 12. You are working on an exam and the questionis smudged and you can’t see the question. Based on the answers only, what isthe answer? (E)
A) All of the below
B) None of the below . C)Some of the above
D) One of the above
E) None of the above F)None of the above 13. If a clock looses 2 seconds per day, how muchtime will it loose in 2 days ? (6sec) 14. A manhas two cubes on his desk. Every day he arranges both cubes so that the frontfaces show the current day of the month. What numbers are on the faces of thecubes to allow this? (0,1,2,3,4,5; 0,1,2,6,7,8) 15. You can go to a fast food restaurant to buychicken nuggets in 6-pack, 9-pack or 20-packs. Is there such a number N, suchthat for all numbers bigger than or equal to N, you can buy that number ofchicken nuggets? (44) 16. Inhow many ways cube can be painted using three different colors (57) Coding Questions 1. Colorful Number: A numbercan be broken into different sub-sequence parts. Suppose a number 3245 can bebroken into parts like 3 2 4 5 32 24 45 324 245. And this number is a colorfulnumber, since product of every digit of a sub-sequence are different. That is,3 2 4 5 (3*2)=6 (2*4)=8 (4*5)=20 (3*2*4)= 24 (2*4*5)= 40. But 326 is not acolorful number as it generates 3 2 6 (3*2)=6 (2*6)=12. You have to writea function that tells if the given number is a colorful number or not. 2. Well-ordered String: You knowa password is well-ordered string. Well-ordered string means that the order ofthe characters is in an alphabetical increasing order. Like “abEm” is awell-ordered number. However, “abmE” is not a well-order number. Given an input# that tells you also how many digits are in the password, print all possiblepasswords. 3. Desirable Number A number is called 'desirable' if all thedigits are strictly ascending eg: 159 as 1<5<9. You know that your rivalhas a strictly numeric password that is 'desirable'. Your close ally has givenyou the number of digits (N) in your rival's password. WAP th\hjtat takes in'N' as input and prints out all possible 'desirable' numbers that can be formedwith N digits. 4. Telephone Number Print all valid phone numbers of length nsubject to following constraints: If a number contains a 4, it should startwith 4 No two consecutive digits can be same Three digits (e.g. 7,2,9) will be entirelydisallowed, take as input 5. SMS You are given a telephone keyboard 0-0, 1-1, 2-ABC2, 3-DEF3, 4-GHI4, 5-JKL5, 6-MNO6,7-PQRS7, 8-TUV8, 9-WXYZ9, *-space, #-char separater
if you type "2", you will get 'A', that is "2"-'A', "22"-'B' ,"222"-'C', "2222"-'D'
However, the digits can repeated many times
"22222"-you get 'A' again
You can use "#" to separate characters, for example
"2#22", you get "AB"
However, you may also have consecutive different digits without separator:"23"-'AD'
If you type "*", it means space.
You a given a sequence of digits, translate it into a text message 6. Keypad Permutation Phone has letters on the number keys. forexample, number 2 has ABC on it, number 3 has DEF, 4 number has GHI,... , andnumber 9 has WXYZ. Write a program that will print out all of the possiblecombination of those letters depending on the input. We are given a specific time(like 02:23), weneed to get the angle between hour and minute(less than 180) 40. Jump Chess There’sa N*N board, two players join the jump game. The chess could go vertically andhorizontally. If the adjacent chess is opponent player’s and the spot besidethat is empty, then the chess could jump to that spot. One chess could not beenjumped twice. Given the position of the spot on the board, write the program tocount the longest length that chess could go. 41. Decimal Number Let the user enter a decimal number. Therange allowed is 0.0001 to 0.9999. Only four decimal places are allowed. Theoutput should be an irreducible fraction. E.g.: If the user enters 0.35,the irreducible fraction will be 7/20. 42. Continuous Alphabets Printcontinuous alphabets from a sequence of arbitrary alphabets
For example:
Input: abcdefljdflsjflmnopflsjflasjftuvwxyz
Output: abcdef; mnop; tuvwxyz
Input: AbcDefljdflsjflmnopflsjflasjftuvWxYz
Output: abcdef; mnop; tuvwxyz 43. Substring Addition Write a program to add the substring. eg :say you have alist {1 7 6 3 5 8 9 } and user is entering a sum 16. Output should display(2-4) that is {7 6 3} cause 7+6+3=16. 44. Balanced String Given a string that has{},[],() and characters.Check if the string is balanced. E.g. {a[(b)]} is balanced. {a[(b])} isunbalanced. 45. RGBCompare Given a string of RGB value (rr, gg, bb)which represents in hexadecimal. Compare if rr or gg or bb is the biggest, ortwo of those values are equal and larger than the third one, or three valuesare equal with each other. 46. Edge Detection Two-dimensional array representation of animage can also be represented by a one-dimensional array of W*H size, where Wrepresent row and H represent column size and each cell represent pixel valueof that image. You are also given a threshold X. For edge detection, you haveto compute difference of a pixel value with each of it's adjacent pixel andfind maximum of all differences. And finally compare if that maximum differenceis greater than threshold X. if so, then that pixel is a edge pixel and have todisplay it. 47. Plus Equal Number Given a number find whether the digits in thenumber can be used to form an equation with + and '='. That is if the number is123, we can have a equation of 1+2=3. But even the number 17512 also forms theequation 12+5=17. 48. Octal and Decimal Palindrome
The decimal and octal values of some numbersare both palindromes sometimes. Find such numbers within a given range.
|