nearHundred
Given an int n, return true if it is within 10 of 100 or 200. Note Math.abs(n) returns the absolute value of a number.
nearHundred(93) -> true
nearHundred(90) -> true
nearHundred(89) ->false
public boolean nearHundred(int n)
Rate this:
Share this:
Like Loading.
Related
Published by Sunil Kumar
I'm working as Project Lead in Oracle. I'm mainly into Microsoft technologies but quite interested in Java and C. I'm not a professional blogger, whatever I find interesting I read it and write a blog post just to share my understanding. View all posts by Sunil Kumar
Published January 11, 2010
Leave a comment Cancel reply
Recent Posts
- Find the Student that Will Replace the Chalk
- Convert 1D Array Into 2D Array
- Find the Winner of the Circular Game
- Find Center of Star Graph
- Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
- Count Number of Nice Subarrays
- Sum of Square Numbers
- Minimum Increment to Make Array Unique
- Relative Sort Array
- Divide Array in Sets of K Consecutive Numbers
Categories
- .Net (143)
- Algorithm (247)
- C (117)
- C# (380)
- C++ (31)
- Codesignal Solutions (6)
- Data structures & Algorithms (266)
- Array & String (117)
- Dictionary/HashTable (35)
- Dynamic Programming (DP) (4)
- graph (1)
- HashSet (14)
- Linked List (48)
- Stack & Queue (34)
- Tree (44)
- Trie (4)
- Adobe (6)
- Amazon (13)
- Apple (7)
- Facebook (11)
- Google (11)
- IBM (2)
- JPMorgan (3)
- LinkedIn (2)
- Microsoft (8)
- Netflix (1)
- Oracle (6)
- Qualcomm (1)
- Salesforce (1)
- Twitter (4)
- Uber (1)
- VMWare (2)
- Yatra.com (1)
- August LeetCode Challenge (9)
- Database (4)
- Design (10)
- July LeetCode Challenge (12)
- June LeetCoding Challenge (7)
- September LeetCoding Challenge (6)