Question 1: Acme Rotations
Archaeologists on planet Acme just uncovered an ancient temple! Above. the entrance, there is an inscription written in lowercase English letters, where each letter is carved into its own stone block. There is a lever next to it that causes a single left-circular rotation pf the inscription each time it’s pulled. For example if the inscription says, bca pulling the lever once changes the inscription to cab and pulling ,a second time changes the inscription to abc.The door will unlock once the inscription is rotated into a state where its as lexicogragphically small as is possible. lexicogragphically small means has the lowest alphabetical order.
Complete the function in the editor below It has one parameter a string inscription, describing the inscription over.a temple’s entrance. function must return an integer denoting the rninimum number of left circular rotations needed to make inscription a, lexicographically small as possible.
Locked stub code in the editor reads a string denoting inscription from stdin and passes in to the function.
• The inscription consists of lowercase English alphabet letters only.
• 1<= length of inscription <= 10^6
Return an integer denoting, the minimum number of left-circular rotations needed to make inscription as lexicogragphically small as possible. This is printed to stdout by locked stud code in the editor.
Sample Input 0
Sample Output 0
Sample Input 1
Sample Output 1
Question 2 : Identifying Triangles
Twitter encourages people to create clear bolts. Imagine you wanted write a bot that created beautiful triangles from a string of integer values.
Given a string of integer values in the form a b c , we want to know which of the following answers that the values of a,b and c satisfy:
- if the values form a valid triangle that has exactly equal sides.the answer is Equilateral.
- if the values form a valid triangle that has exactly three equal sides, the answer is Equilateral.
- if the values do not form a triangle than is neither isosceles nor equilateral, the answer is None of these.
The first line contains an integer , n, denoting the number of elements in abc
Each line i of the n subsequent lines (where 0 <= i < n) contains a string describing abci.
1 <= n <= 5000
1 <= a,b,c <= 2000
- Twitter Interview | Set 1
- Twitter Sentiment Analysis using Python
- Google Interview Experience | Set 2 (Placement Questions)
- BrowserStack Interview Experience | Set 2 (Coding Questions)
- BrowserStack Interview Experience | Set 3 (Coding Questions)
- Amazon Interview Questions | Set 146
- Amazon Interview Questions | Set 147
- CommonFloor Interview Experience | Set 1 (Placement Questions 2014)
- D E Shaw Interview | Set 8 (Telephonic Round Questions)
- SAP Labs Interview Questions | Set 8 (Bangalore)
- BrowserStack Interview Experience | Set 7 (Online Coding Questions)
- MakeMyTrip Interview Questions | Set 6
- SAP Labs Interview Questions | Set 9 (Fresher)
- Directi Interview | Set 7 (Programming Questions)
- Commonly Asked Java Programming Interview Questions | Set 2
- Wipro interview questions for laterals | Set 1
- Directi Interview Experience | Set 19 (Round 1 Questions)
- Veritas Interview Experience | Set 3 (On-Campus Aptitude Questions)
- TCS Ninja Interview Experience and Interview Questions
- Directi Interview Questions
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.