• Find a freelancer
  • Publish project
  • Find a job
  • Українська
  • Русский
  • Polski
  • Deutsch
Login Registration
  1. Freelance projects
  1. Freelance projects

Решить две задачи с codewars на Scala (2 любые из описания) 300 грн

Java — incorrectly specified categories?
11 USD

Count the smiley faces!
Given an array (arr) as an argument complete the function countSmileys that should return the total number of smiling faces.

Rules for a smiling face:

  • Each smiley face must contain a valid pair of eyes. Eyes can be marked as : or ;
  • A smiley face can have a nose but it does not have to. Valid characters for a nose are - or ~
  • Every smiling face must have a smiling mouth that should be marked with either ) or D

No additional characters are allowed except for those mentioned.

Valid smiley face examples: :) :D ;-D :~)
Invalid smiley faces: ;( :> :} :]

Example

countSmileys([':)', ';(', ';}', ':-D']);       // should return 2;
countSmileys([';D', ':-(', ':-)', ';~)']);     // should return 3;
countSmileys([';]', ':[', ';*', ':$', ';-D']); // should return 1;

Note

In case of an empty array return 0. You will not be tested with invalid input (input will always be an array). Order of the face (eyes, nose, mouth) elements will always be the same.


Count the number of Duplicates

Write a function that will return the count of distinct case-insensitive alphabetic characters and numeric digits that occur more than once in the input string. The input string can be assumed to contain only alphabets (both uppercase and lowercase) and numeric digits.

Example

"abcde" -> 0 # no characters repeats more than once
"aabbcde" -> 2 # 'a' and 'b'
"aabBcde" -> 2 # 'a' occurs twice and 'b' twice (`b` and `B`)
"indivisibility" -> 1 # 'i' occurs six times
"Indivisibilities" -> 2 # 'i' occurs seven times and 's' occurs twice
"aA11" -> 2 # 'a' and '1'
"ABBA" -> 2 # 'A' and 'B' each occur twice


Persistent Bugger.

Write a function, persistence, that takes in a positive parameter num and returns its multiplicative persistence, which is the number of times you must multiply the digits in num until you reach a single digit.

For example (Input --> Output):

39 --> 3 (because 3*9 = 27, 2*7 = 14, 1*4 = 4 and 4 has only one digit)
999 --> 4 (because 9*9*9 = 729, 7*2*9 = 126, 1*2*6 = 12, and finally 1*2 = 2)
4 --> 0 (because 4 is already a one-digit number)
Proposals

Proposals are currently absent

Freelancers are reviewing the task — proposals will appear here soon.

Proposals are currently absent

Freelancers are reviewing the task — proposals will appear here soon.
    Add Comment

Current freelance projects in the category Java

Urgent

Real-Time Trainer

Python Java
456 USD 52 proposals

We are developing a real-time integration with the external service Trainer. We send structured snapshots of the state, receive recommendations, and display them in a pop-up bubble. The task is stable and complete data transmission for the correct operation of the Trainer. We are looking for a developer for the chain: data processing → HTTP communication → overlay. We need people with the following skills Python is good, Java basics, API HTTP/JSON-APIs The project is 90% ready but there are some inconsistencies

20 July
Loading...
Loading...
Client
Mary Shevchenko
  • Mary Shevchenko
  • Kyiv, Ukraine
  • Projects 1
  • Rating -
  • Rating 75
Publish a similar project
Information
  • Published: 25 December 2022, 19:33
  • Views: 26

Tags

  • Freelance projects RSS
  • All freelancers
  • Contests RSS
  • Freelancer works
  • Safe
  • All clients
  • Plus
  • Registration
  • Forgot password?
  • Service status
  • Site map
  • Knowledge base
  • [email protected]
Language
  • Українська
  • Русский
  • Polski
  • Deutsch
We Accept Payments
Visa Mastercard Google Pay Apple Pay PayPal
Language
  • Українська
  • Русский
  • Polski
  • Deutsch
We Accept Payments
Visa Mastercard Google Pay Apple Pay PayPal
We are on social networks
Service Rules Privacy
Made in Ukraine © 2005-2026 v34.332
Menu
Find a freelancer Publish project Find a job
  • Українська
  • Русский
  • Polski
  • Deutsch
    Make a proposal
Loading...
Client
Mary Shevchenko
  • Mary Shevchenko
  • Kyiv, Ukraine
  • Projects 1
  • Rating -
  • Rating 75
Loading...
Information
  • Published: 25 December 2022, 19:33
  • Views: 26
Loading...
Status
Loading...
Loading...