1. Trang chủ
  2. » Công Nghệ Thông Tin

Báo cáo project 1 copy

295 4 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

Câu 1 : Fibonacci 2 Câu 2 : Sum of Digits Digital Root 2 Câu 3 : Fibonacci 3 Câu 4 : Find the next perfect square 4 Câu 5 : Reverse words 5 Câu 6 : Convert number to reversed array of digits 6 Convert number to reversed array of digits 6 Câu 7 : Unique In Order 7 Cau 8 : Bouncing Balls 8 Câu 9 : Dont give me five 10 Dont give me five 10 Câu 10 : Build Tower 11 Câu 11 : String ends with? 13 Câu 12 : Friend or Foe? 13 Câu 13 : Two fighters, one winner. 14 Câu 14: Remove the minimum 16 Câu 15 : Is this a triangle? 17 Câu 16 : Find the capitals 17 Câu 17 : Count the divisors of a number 18 Câu 18 : Sort array by string length 19 Câu 19 : Testing 123 20 Câu 20 : Number of People in the Bus 20 Câu 21 : Odd or Even? 21 Câu 22 : Check the exam 22 Câu 23 : Remove anchor from URL 24 Câu 24 : Anagram Detection 24 Câu 25 : Round up to the next multiple of 5 25 Câu 26 : Youre a square 26 Câu 27 : Maximum Length Difference 27 Câu 28 : Get the Middle Character 28 Câu 29 : Alternate capitalization 29 Câu 30 : Summing a numbers digits 30 Câu 31 : Breaking chocolate problem 31 Câu 32 : Money, Money, Money 32 Câu 33 : Two Oldest Ages 34 Câu 34 : Factorial 35 Câu 35 : Are the numbers in order? 35 Are the numbers in order? 35 Câu 36 : Deodorant Evaporator 37 Câu 37 : Exes and Ohs 37 Câu 38 : Sum of all the multiples of 3 or 5 38 Câu 39 : The Coupon Code 39 Câu 40 : Simple Fun 176: Reverse Letter 40 Câu 41 : Small enough? Beginner 41 Câu 42 : Sum of angles 42 Câu 44 : Make a function that does arithmetic 43 Câu 45 : Fix string case 44 Câu 46 : Sort Numbers 46 Câu 47 : List Filtering 46 Câu 48 : Alphabet war 47 Câu 49 : Descending Order 49 Câu 50 : Count the Digit 49 Câu 51 : Binary Addition 51 Câu 52 : Sum of numbers from 0 to N 51 Câu 53 : Love vs friendship 53 Câu 55 : Highest and Lowest 55 Câu 56 : Maximum Multiple 56 Câu 58 : Printer Errors 58 Câu 59 : Predict your age 59 Câu 60 : Sum of two lowest positive integers 60 Câu 61 : Square Every Digit 61 Câu 62 : Regex validate PIN code 62 Câu 63 : Beginner Series 3 Sum of Numbers 63 Câu 64 : Shortest Word 64 Câu 66 : Jaden Casing Strings 65 Câu 67 : Row Weights 66 Câu 68 : Remove duplicate words 68 Câu 69 : Find the vowels 69 Câu 70 : Sum of a sequence 70 Câu 71 : Volume of a Cuboid 71 Câu 72 : Disemvowel Trolls 72 Câu 73 : Speed Control 72 Câu 74 : Mumbling 74 Câu 75 : Find the stray number 75 Câu 76 : I love you, a little , a lot, passionately ... not at all 76 Câu 77 : Categorize New Member 77 Câu 78 : Greet Me 78 Câu 79 : Sum of Triangular Numbers 79 Câu 80 : Alphabet symmetry 80 Câu 81 : Gauß needs help (Sums of a lot of numbers). 81 Câu 82 : Sum of odd numbers 81 Câu 83 : Thinkful String Drills: Repeater 82 Câu 84 : Isograms 83 Câu 85 : Sort the Gift Code 84 Câu 86 : Largest 5 digit number in a series 85 Câu 87 : Balanced Number (Special Numbers Series 1 ) 86 Câu 88 : Fizz Buzz 87 Câu 89 : Power of two 88 Câu 90 : The highest profit wins 89 Câu 91 : Simple Fun 152: Invite More Women? 90 Câu 92 :Growth of a Population 91 Câu 93 : Bumps in the Road 93 Câu 94 : Moves in squared strings (I) 94 Câu 95 : Number of Decimal Digits 96 Câu 96 : Alphabetical Addition 96 Câu 97 : Build a square 98 Câu 97 : Convert an array of strings to array of numbers 99 Câu 98 : Simple beads count 99 Câu 99 : Ordered Count of Characters 100 Câu 100 : Sum of Cubes 101 Câu 101 : Leap Years 102 Câu 102 : Functional Addition 103 Câu 103 : Averages of numbers 103 Câu 104 : max diff easy 104 Câu 105 : Most digits 105 Câu 106 : My Language Skills 106 Câu 107 : Switcheroo 107 Câu 108 : Find the nth Digit of a Number 108 Câu 109 : Lost number in number sequence 109 Câu 110 : JavaScript Array Filter 109 Câu 111 : Reverse a Number 110 Câu 112 : Largest pair sum in array 111 Câu 113 : Strong Number (Special Numbers Series 2) 112 Câu 114 : Currying functions: multiply all elements in an array 112 Câu 115 : Simple Fun 74: Growing Plant 113 Câu 116 : Disarium Number (Special Numbers Series 3) 116 Câu 117 : Alternate case 117 Câu 118 : Boiled Eggs 118 Câu 119 : Array element parity 119 Câu 120 : Greatest common divisor 120 Câu 121 : Rotate for a Max 121 Câu 122 : A Rule of Divisibility by 7 122 Câu 123 : Going to the cinema 124 Câu 124 : Simple remove duplicates 125 Câu 125 : Sum of array singles 126 Câu 126 : Factorial 127 Câu 127 : Indexed capitalization 127 Câu 128 : Filter the number 128 Câu 129 : Incrementer 129 Câu 130 : Cat and Mouse Easy Version 130 Câu 131 : Complementary DNA 130 Câu 132 : Complete The Pattern 1 131 Câu 133 : Difference Of Squares 133 Câu 134 : Convert a linked list to a string 134 Câu 135 : Narcissistic Numbers 136 Câu 136 : Unlucky Days 137 Câu 137 : Word values 139 Câu 138 : Basic Calculator 140 Câu 139 : Discover The Original Price 141 Câu 140 : All Inclusive? 141 Câu 141 : Expressions Matter 143 Câu 142 : Maximum Product 144 Câu 143 : Parts of a list 145 Câu 144 : Digital cypher 147 Câu 145 : Basic Sequence Practice 149 Câu 146 : All unique 151 Câu 147 : Numbers to Letters 151 Câu 148 : Simple string characters 152 Câu 149 : Sort by Last Char 153 Câu 150 : Compare Strings by Sum of Chars 153 Câu 151 : All Star Code Challenge 22 154 Câu 152 : Digitize 155 Câu 153 : Count all the sheep on farm in the heights of New Zealand 156 Câu 154 : Numbers in strings 157 Câu 155 : Return the first M multiples of N 158 Câu 156 : Recursion 1 Factorial 159 Câu 157 : Even or Odd 159 Câu 158 : The Office II Boredom Score 160 Câu 159 : Split In Parts 161 Câu 160 : Sum of integers in string 162 Câu 162 : Digits explosion 164 Câu 162 : The old switcheroo 165 Câu 163 : Counting Array Elements 166 Câu 164 : Responsible Drinking 167 Câu 165 : Multiply characters 168 Câu 166 : OddEven String Sort 169 Câu 167 : Nth power rules them all 170 Câu 168 : Drying Potatoes 171 Câu 169 : Average Scores 172 Câu 170 : Return the closest number multiple of 10 172 Câu 171 : Smallest value of an array 173 Câu 172 : The wheatrice and chessboard problem 174 Câu 172 : Building blocks 175 Câu 174 : Substituting Variables Into Strings: Padded Numbers 177 Câu 175 : Case Swapping 178 Câu 176 : Looking for a benefactor 178 Câu 177 : Basic Math (Add or Subtract) 180 Câu 178 : SevenAte9 181 Câu 179 : Clean up after your dog 181 Câu 180 : Say hello 183 Câu 181 : Reverse the bits in an integer 183 Câu 182 : Unique string characters 184 Câu 183 : Regexp Basics is it a vowel? 185 Câu 184 : Find the lucky numbers 186 Câu 185 : Simple Fun 2: Circle of Numbers 186 Câu 186 : By 3, or not by 3? That is the question . . . 188 Câu 187 : Last Survivor 189 Câu 188 : Building Strings From a Hash 190 Câu 189 : Number Of Occurrences 191 Câu 190 : Exclamation marks series 13: Count the number of exclamation marks and question marks, return the product 191 Câu 191 : Simple Fun 37: House Numbers Sum 192 Câu 192 : Interview Question (easy) 194 Câu 193 : Credit card issuer checking 197 Câu 194 : Valid Spacing 198 Câu 195 : Simple string reversal 199 Câu 196 : Letterbox PaintSquad 200 Câu 197 : Check three and two 202 Câu 198 : Character Counter 203 Câu 199 : Inspiring Strings 204 Câu 200 : Complete The Pattern 2 205 Câu 201 : makeBackronym 207 back·ro·nym 207 Câu 202 : Remove All The Marked Elements of a List 208 Câu 203 : Evens times last 209 Câu 204 : Insert dashes 210 Câu 205 : Initialize my name 211 Câu 206 : Computer problem series 1: Fill the Hard Disk Drive 212 Câu 207 : getNames() 213 Câu 208 : Nice Array 214 Câu 209 : Enumerable Magic 5 True for Just One? 216 Câu 210 : Holiday III Fire on the boat 216 Câu 211 : Volume of a Cuboid 217 Câu 212 : Reverse words 217 Câu 214 : Find the next perfect square 218 Câu 215 : Ones and Zeros 219 Câu 216 : Flatten and sort an array 220 Câu 217 : Coding Meetup 1 HigherOrder Functions Series Count the number of JavaScript developers coming from Europe 221 Câu 218 : Coloured Triangles 222 219 : Char Code Calculation 223 Câu 220 : Spacify 224 Câu 222 : The Office I Outed 226 Câu 223 : Coding Meetup 2 HigherOrder Functions Series Greet developers 226 Câu 234 : Simple consecutive pairs 228 Câu 225 : Halving Sum 229 Câu 227 : Squares sequence 230 Câu 228 : Count the Characters 230 Câu 229 : Dont give me five 231 Dont give me five 231 Câu 230 : Series of integers from m to n 232 Câu 231 : Volume of a Cuboid 232 Câu 233 : The Office IV Find a Meeting Room 233 Câu 234 : Help the Fruit Guy 234 Câu 235 : Sort arrays 1 234 Câu 236 : Covfefe 235 Câu 237 : ATM 235 Câu 238 : Double Sort 236 Câu 239 : 16+18=214 237 Câu 240 : Broken sequence 238 Câu 241 : Replace every nth 239 Câu 242 : How many arguments 240 Câu 243 : Formatting decimal places 1 241 Câu 244 : Summy 241 Câu 245 : Find Screen Size 242 The Challenge 242 Câu 246 : Find Count of Most Frequent Item in an Array 243 Câu 247 : Remove consecutive duplicate words 243 Câu 248 : Find all pairs 244 Câu 249 : Correct the timestring 245 Câu 250 : Bingo ( Or Not ) 246 Câu 251 : Spoonerize Me 247 Câu 252 : Stanton measure 248 Câu 253 : Arithmetic progression 248 Câu 254 : Numbers with this digit inside 249 Câu 255 : String Merge 250 Câu 256 : lucky number 251 Câu 257 : Scaling Squared Strings 251 Câu 258 : Maxmin arrays 253 Câu 259 : Plus minus plus plus ... Count 254 Câu 260 : Pandemia

Contents Câu : Fibonacci Câu : Sum of Digits / Digital Root Câu : Fibonacci Câu : Find the next perfect square! Câu : Reverse words Câu : Convert number to reversed array of digits .6 Convert number to reversed array of digits Câu : Unique In Order .7 Cau : Bouncing Balls Câu : Don't give me five! 10 Don't give me five! 10 Câu 10 : Build Tower 11 Câu 11 : String ends with? 13 Câu 12 : Friend or Foe? 13 Câu 13 : Two fighters, one winner 14 Câu 14: Remove the minimum 16 Câu 15 : Is this a triangle? .17 Câu 16 : Find the capitals 17 Câu 17 : Count the divisors of a number 18 Câu 18 : Sort array by string length .19 Câu 19 : Testing 1-2-3 20 Câu 20 : Number of People in the Bus 20 Câu 21 : Odd or Even? 21 Câu 22 : Check the exam 22 Câu 23 : Remove anchor from URL .24 Câu 24 : Anagram Detection 24 Câu 25 : Round up to the next multiple of .25 Câu 26 : You're a square! 26 Câu 27 : Maximum Length Difference 27 Câu 28 : Get the Middle Character .28 Câu 29 : Alternate capitalization .29 Câu 30 : Summing a number's digits 30 Câu 31 : Breaking chocolate problem 31 Câu 32 : Money, Money, Money .32 Câu 33 : Two Oldest Ages 34 Câu 34 : Factorial 35 Câu 35 : Are the numbers in order? .35 Are the numbers in order? 35 Câu 36 : Deodorant Evaporator 37 Câu 37 : Exes and Ohs .37 Câu 38 : Sum of all the multiples of or 38 Câu 39 : The Coupon Code 39 Câu 40 : Simple Fun #176: Reverse Letter 40 Câu 41 : Small enough? - Beginner 41 Câu 42 : Sum of angles .42 Câu 44 : Make a function that does arithmetic! 43 Câu 45 : Fix string case 44 Câu 46 : Sort Numbers .46 Câu 47 : List Filtering 46 Câu 48 : Alphabet war 47 Câu 49 : Descending Order 49 Câu 50 : Count the Digit 49 Câu 51 : Binary Addition 51 Câu 52 : Sum of numbers from to N 51 Câu 53 : Love vs friendship 53 Câu 55 : Highest and Lowest 55 Câu 56 : Maximum Multiple 56 Câu 58 : Printer Errors 58 Câu 59 : Predict your age! 59 Câu 60 : Sum of two lowest positive integers 60 Câu 61 : Square Every Digit .61 Câu 62 : Regex validate PIN code 62 Câu 63 : Beginner Series #3 Sum of Numbers 63 Câu 64 : Shortest Word 64 Câu 66 : Jaden Casing Strings 65 Câu 67 : Row Weights .66 Câu 68 : Remove duplicate words 68 Câu 69 : Find the vowels 69 Câu 70 : Sum of a sequence 70 Câu 71 : Volume of a Cuboid 71 Câu 72 : Disemvowel Trolls .72 Câu 73 : Speed Control 72 Câu 74 : Mumbling .74 Câu 75 : Find the stray number 75 Câu 76 : I love you, a little , a lot, passionately not at all 76 Câu 77 : Categorize New Member 77 Câu 78 : Greet Me 78 Câu 79 : Sum of Triangular Numbers 79 Câu 80 : Alphabet symmetry 80 Câu 81 : Gauß needs help! (Sums of a lot of numbers) 81 Câu 82 : Sum of odd numbers 81 Câu 83 : Thinkful - String Drills: Repeater .82 Câu 84 : Isograms 83 Câu 85 : Sort the Gift Code 84 Câu 86 : Largest digit number in a series 85 Câu 87 : Balanced Number (Special Numbers Series #1 ) .86 Câu 88 : Fizz Buzz 87 Câu 89 : Power of two 88 Câu 90 : The highest profit wins! 89 Câu 91 : Simple Fun #152: Invite More Women? 90 Câu 92 :Growth of a Population 91 Câu 93 : Bumps in the Road 93 Câu 94 : Moves in squared strings (I) 94 Câu 95 : Number of Decimal Digits 96 Câu 96 : Alphabetical Addition 96 Câu 97 : Build a square .98 Câu 97 : Convert an array of strings to array of numbers 99 Câu 98 : Simple beads count 99 Câu 99 : Ordered Count of Characters 100 Câu 100 : Sum of Cubes 101 Câu 101 : Leap Years 102 Câu 102 : Functional Addition 103 Câu 103 : Averages of numbers 103 Câu 104 : max diff - easy 104 Câu 105 : Most digits 105 Câu 106 : My Language Skills 106 Câu 107 : Switcheroo 107 Câu 108 : Find the nth Digit of a Number 108 Câu 109 : Lost number in number sequence 109 Câu 110 : JavaScript Array Filter 109 Câu 111 : Reverse a Number 110 Câu 112 : Largest pair sum in array 111 Câu 113 : Strong Number (Special Numbers Series #2) 112 Câu 114 : Currying functions: multiply all elements in an array 112 Câu 115 : Simple Fun #74: Growing Plant .113 Câu 116 : Disarium Number (Special Numbers Series #3) .116 Câu 117 : Alternate case .117 Câu 118 : Boiled Eggs .118 Câu 119 : Array element parity .119 Câu 120 : Greatest common divisor 120 Câu 121 : Rotate for a Max .121 Câu 122 : A Rule of Divisibility by 122 Câu 123 : Going to the cinema 124 Câu 124 : Simple remove duplicates 125 Câu 125 : Sum of array singles .126 Câu 126 : Factorial .127 Câu 127 : Indexed capitalization .127 Câu 128 : Filter the number 128 Câu 129 : Incrementer 129 Câu 130 : Cat and Mouse - Easy Version 130 Câu 131 : Complementary DNA 130 Câu 132 : Complete The Pattern #1 131 Câu 133 : Difference Of Squares 133 Câu 134 : Convert a linked list to a string 134 Câu 135 : Narcissistic Numbers 136 Câu 136 : Unlucky Days 137 Câu 137 : Word values 139 Câu 138 : Basic Calculator 140 Câu 139 : Discover The Original Price 141 Câu 140 : All Inclusive? 141 Câu 141 : Expressions Matter 143 Câu 142 : Maximum Product 144 Câu 143 : Parts of a list 145 Câu 144 : Digital cypher 147 Câu 145 : Basic Sequence Practice .149 Câu 146 : All unique 151 Câu 147 : Numbers to Letters .151 Câu 148 : Simple string characters .152 Câu 149 : Sort by Last Char 153 Câu 150 : Compare Strings by Sum of Chars 153 Câu 151 : All Star Code Challenge #22 .154 Câu 152 : Digitize .155 Câu 153 : Count all the sheep on farm in the heights of New Zealand .156 Câu 154 : Numbers in strings 157 Câu 155 : Return the first M multiples of N .158 Câu 156 : Recursion #1 - Factorial 159 Câu 157 : Even or Odd 159 Câu 158 : The Office II - Boredom Score 160 Câu 159 : Split In Parts 161 Câu 160 : Sum of integers in string 162 Câu 162 : Digits explosion 164 Câu 162 : The old switcheroo 165 Câu 163 : Counting Array Elements 166 Câu 164 : Responsible Drinking 167 Câu 165 : Multiply characters 168 Câu 166 : Odd-Even String Sort 169 Câu 167 : Nth power rules them all! 170 Câu 168 : Drying Potatoes 171 Câu 169 : Average Scores 172 Câu 170 : Return the closest number multiple of 10 172 Câu 171 : Smallest value of an array 173 Câu 172 : The wheat/rice and chessboard problem 174 Câu 172 : Building blocks 175 Câu 174 : Substituting Variables Into Strings: Padded Numbers .177 Câu 175 : Case Swapping 178 Câu 176 : Looking for a benefactor .178 Câu 177 : Basic Math (Add or Subtract) 180 Câu 178 : SevenAte9 181 Câu 179 : Clean up after your dog 181 Câu 180 : Say hello! 183 Câu 181 : Reverse the bits in an integer 183 Câu 182 : Unique string characters 184 Câu 183 : Regexp Basics - is it a vowel? 185 Câu 184 : Find the lucky numbers .186 Câu 185 : Simple Fun #2: Circle of Numbers 186 Câu 186 : By 3, or not by 3? That is the question 188 Câu 187 : Last Survivor 189 Câu 188 : Building Strings From a Hash 190 Câu 189 : Number Of Occurrences 191 Câu 190 : Exclamation marks series #13: Count the number of exclamation marks and question marks, return the product .191 Câu 191 : Simple Fun #37: House Numbers Sum 192 Câu 192 : Interview Question (easy) 194 Câu 193 : Credit card issuer checking .197 Câu 194 : Valid Spacing 198 Câu 195 : Simple string reversal 199 Câu 196 : Letterbox Paint-Squad 200 Câu 197 : Check three and two .202 Câu 198 : Character Counter 203 Câu 199 : Inspiring Strings 204 Câu 200 : Complete The Pattern #2 205 Câu 201 : makeBackronym .207 back·ro·nym 207 Câu 202 : Remove All The Marked Elements of a List 208 Câu 203 : Evens times last .209 Câu 204 : Insert dashes 210 Câu 205 : Initialize my name 211 Câu 206 : Computer problem series #1: Fill the Hard Disk Drive 212 Câu 207 : getNames() .213 Câu 208 : Nice Array 214 Câu 209 : Enumerable Magic #5- True for Just One? 216 Câu 210 : Holiday III - Fire on the boat 216 Câu 211 : Volume of a Cuboid .217 Câu 212 : Reverse words 217 Câu 214 : Find the next perfect square! 218 Câu 215 : Ones and Zeros .219 Câu 216 : Flatten and sort an array 220 Câu 217 : Coding Meetup #1 - Higher-Order Functions Series - Count the number of JavaScript developers coming from Europe 221 Câu 218 : Coloured Triangles 222 219 : Char Code Calculation 223 Câu 220 : Spacify 224 Câu 222 : The Office I - Outed 226 Câu 223 : Coding Meetup #2 - Higher-Order Functions Series - Greet developers .226 Câu 234 : Simple consecutive pairs 228 Câu 225 : Halving Sum .229 Câu 227 : Squares sequence 230 Câu 228 : Count the Characters 230 Câu 229 : Don't give me five! 231 Don't give me five! 231 Câu 230 : Series of integers from m to n 232 Câu 231 : Volume of a Cuboid .232 Câu 233 : The Office IV - Find a Meeting Room 233 Câu 234 : Help the Fruit Guy 234 Câu 235 : Sort arrays - 234 Câu 236 : Covfefe .235 Câu 237 : ATM 235 Câu 238 : Double Sort .236 Câu 239 : 16+18=214 237 Câu 240 : Broken sequence 238 Câu 241 : Replace every nth 239 Câu 242 : How many arguments 240 Câu 243 : Formatting decimal places #1 241 Câu 244 : Summy .241 Câu 245 : Find Screen Size .242 The Challenge 242 Câu 246 : Find Count of Most Frequent Item in an Array 243 Câu 247 : Remove consecutive duplicate words 243 Câu 248 : Find all pairs .244 Câu 249 : Correct the time-string 245 Câu 250 : Bingo ( Or Not ) .246 Câu 251 : Spoonerize Me 247 Câu 252 : Stanton measure 248 Câu 253 : Arithmetic progression 248 Câu 254 : Numbers with this digit inside 249 Câu 255 : String Merge! .250 Câu 256 : lucky number 251 Câu 257 : Scaling Squared Strings 251 Câu 258 : Max-min arrays .253 Câu 259 : Plus - minus - plus - plus - - Count .254 Câu 260 : Pandemia � .254 Câu 261 : Calculate mean and concatenate string 256 Câu 262 : The fusc function Part 257 Câu 263 : The Office III - Broken Photocopier 258 Câu 265 : Last 259 Câu 266 : Is n divisible by ( )? .259 Câu 267 : "Very Even" Numbers 260 Câu 268 : Thinking & Testing: A and B? .261 Câu269 : Linked Lists - Push & BuildOneTwoThree .261 Câu 270 : Number-Star ladder 262 Câu 271 : Powers of .264 Câu 272 : Even numbers in an array 264 Câu 273 : Coding Meetup #3 - Higher-Order Functions Series - Is Ruby coming? 265 Câu 274 : Coding Meetup #11 - Higher-Order Functions Series - Find the average age 266 Câu 275 : Coding Meetup #5 - Higher-Order Functions Series - Prepare the count of languages 267 Câu 276 : Debug Sum of Digits of a Number 268 Câu 277 : Divide and Conquer 269 Câu 278 : V A P O R C O D E 269 Câu 279 : Sum even numbers .270 Câu 280 : All Star Code Challenge #3 .270 Câu 281 : Coding Meetup #6 - Higher-Order Functions Series - Can they code in the same language? 271 Câu 282 : Nth Root of a Number 272 Câu 283 : Consecutive items 272 Câu 284 : Head, Tail, Init and Last .273 Câu 285 : Find and max 275 Câu 286 : Find Nearest square number 275 Câu 287 : Find the middle element .275 Câu 288 : Consecutive Vowels in a String 276 Câu 289 : CSV representation of array 277 Câu 290 : Add property to every object in array 278 Câu 291 : Rock Paper Scissors! .279 Câu 292 : Help Suzuki complete his chores! 280 Câu 293 : Scrabble Score 281 Câu 294 : Merge two sorted arrays into one 282 Câu 295 : The fusc function Part 283 Câu 296 : Dot Calculator 284 Câu 297 : Find Nearest square number .285 Câu 298 : Powers of .285 Câu 299 : L1: Set Alarm 286 Câu 300 : Tổng số điểm 287 Câu : Fibonacci Create function fib that returns n'th element of Fibonacci sequence (classic programming task) INPUT : nhập số n OUTPUT : in dãy fibonacci B1 : khai báo f0 = , f1 = , fn = B2 : n < trả -1 , n = n = trả n B3 : n > thực vòng lặp for gán f0 = f1 , f1 = fn , fn = f0 + f1 trả fn kết thức thuật toán Câu : Sum of Digits / Digital Root Given n , take the sum of the digits of n If that value has more than one digit, continue reducing in this way until a single-digit number is produced The input will be a non-negative integer Examples 16 942 132189 493193 > > > > + + + + = + + + = 15 > + = + + + = 24 > + + + = 29 > + = + = 11 INPUT : nhập số number OUTPUT : tính tổng chữ số n tổng số nhỏ 10 B1 : khai báo sum , reminder B2 : thực vịng lặp while với number > reminder = number % 10 sum = reminder + sum number = number / 10 > + = Câu 293 : Scrabble Score Write a program that, given a word, computes the scrabble score for that word Letter Values You'll need these: Letter Value A, E, I, O, U, L, N, R, S, T D, G B, C, M, P F, H, V, W, Y K J, X Q, Z 10 There will be a preloaded hashtable $dict with all these values: $dict["E"] == Examples "cabbage" > 14 "cabbage" should be scored as worth 14 points:  points for C  point for A, twice  points for B, twice  points for G  point for E And to total: + 2*1 + 2*3 + + = + + + = 14 Empty string should return The string can contain spaces and letters (upper and lower case), you should calculate the scrabble score only of the letters in that string "" "STREET" "st re et" "ca bba g > > > e" > 14 Câu 294 : Merge two sorted arrays into one You are given two sorted arrays that both only contain integers Your task is to find a way to merge them into a single one, sorted in asc order Complete the function mergeArrays(arr1, arr2), where arr1 and arr2 are the original sorted arrays You don't need to worry about validation, since arr1 and arr2 must be arrays with or more Integers If both arr1 and arr2 are empty, then just return an empty array Note: arr1 and arr2 may be sorted in different orders Also arr1 and arr2 may have same integers Remove duplicated in the returned result Examples (input -> output) * [1, 2, 3, 4, 5], [6, 7, 8, 9, 10] -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] * [1, 3, 5, 7, 9], [10, 8, 6, 4, 2] -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] * [1, 3, 5, 7, 9, 11, 12], [1, 2, 3, 4, 5, 10, 12] -> [1, 2, 3, 4, 5, 7, 9, 10, 11, 12] Câu 295 : The fusc function Part The fusc function is defined recursively as follows: fusc(0) = fusc(1) = fusc(2 * n) = fusc(n) fusc(2 * n + 1) = fusc(n) + fusc(n + 1) The rules above are sufficient to determine the value of fusc for any non-negative input n For example, let's say you want to compute fusc(10) fusc(10) = fusc(5) , by rule fusc(5) = fusc(2) + fusc(3) , by rule fusc(2) = fusc(1) , by rule fusc(1) = , by rule fusc(3) = fusc(1) + fusc(2) by rule fusc(1) and fusc(2) have already been computed are both equal to Putting these results together fusc(10) = fusc(5) = fusc(2) + fusc(3) = + = Your job is to produce the code for the fusc function In this kata, your function will be tested with small values of n , so you should not need to be concerned about stack overflow or timeouts Hint: Use recursion Câu 296 : Dot Calculator Dot Calculator You have to write a calculator that receives strings for input The dots will represent the number in the equation There will be dots on one side, an operator, and dots again after the operator The dots and the operator will be separated by one space Here are the following valid operators :  + Addition  - Subtraction  * Multiplication  // Integer Division Your Work (Task) You'll have to return a string that contains dots, as many the equation returns If the result is 0, return the empty string When it comes to subtraction, the first number will always be greater than or equal to the second number Examples (Input => Output) * * * * * * * * * " + ." " - " " - " " * " " * " " // " " // " " // " " - " => => => => => => => => => " " " " " " " ." " " " " " " "" "" Câu 297 : Find Nearest square number Your task is to find the nearest square number, nearest_sq(n), of a positive integer n Câu 298 : Powers of Complete the function that takes a non-negative integer n as input, and returns a list of all the powers of with the exponent ranging from to n ( inclusive ) Examples n = n = n = ==> [1] ==> [1, 2] ==> [1, 2, 4] # [2^0] # [2^0, 2^1] # [2^0, 2^1, 2^2] Câu 299 : L1: Set Alarm Write a function named setAlarm which receives two parameters The first parameter, employed, is true whenever you are employed and the second parameter, vacation is true whenever you are on vacation The function should return true if you are employed and not on vacation (because these are the circumstances under which you need to set an alarm) It should return false otherwise Examples: setAlarm(true, true) -> false setAlarm(false, true) -> false setAlarm(false, false) -> false setAlarm(true, false) -> true Câu 300 : Tổng số điểm Our football team finished the championship The result of each match look like "x:y" Results of all matches are recorded in the collection For example: ["3:1", "2:2", "0:1", ] Write a function that takes such collection and counts the points of our team in the championship Rules for counting points for each match:  if x > y: points  if x < y: point  if x = y: point Notes:  there are 10 matches in the championship 

Ngày đăng: 04/08/2022, 01:56

w