Barbara Fischer

Ranch Hand
+ Follow
since Nov 22, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
8
Given in last 30 days
8
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Barbara Fischer

I think there should be a logic-bug. What do you think?
1 week ago
1 week ago
I stumbled in an another issue.  A bit feared to put here because I think there are too many if - else statement.
The problem is that:
Task Given an array of ints, print 'false' if the value '3' appears in the array exactly 3 times and no '3's are next to each other. Otherwise print 'true'.  Input Format The first line contains a single integer, n, denoting the size of the array. Each line i of the n subsequent lines contains a single integer denoting the value of the array at position i.  Output Format Simply the word 'true' or 'false'.


This page put me back these values:
Input                              Expected Output           Output
4 3 1 3 3                              true                        true
5 3 1 3 1 3                      false                        true
5 3 4 3 3 4                      true                        true
3 3 3 3                              true                        false
6 3 1 3 3 4 6                      true                        true
7 1 3 4 5 3 2 3                      false                        true
7 3 1 3 2 3 4 5                      false                        false
1 week ago
I mean " anything else " ?
1 week ago
How do I know that a code is enoug good?

I think this can be measured the less code writing ( Now I come up in my mind Robert Green : Clean code maybe back here )
- use less from the computer resources ( for it I need to know things like what you mentioned like String in recursion methods. Could you please suggest webpages ? )
- anything else?
*With all respect I asked this question
1 week ago
Thank you Campbell!

I saved for me later. Also I have some question. Regarding BufferRead class vs. Scanner. But first I discover, so may I find my answers.

I also stumbled upon a question about 2D Array or Hourglass array. Is there any different to read this kind of array or it is just 4x4/8x8 and the same data structure?
But what to do when there is a missing space like:
1 1 1     1 1 0     1 0 0
   1        0          0
1 1 1     1 1 0     1 0 0

Like these.
1 week ago
1 week ago
Task Given a string and an int n, print a string made of n+1 repetitions of the last n characters of the string. You may assume that n is between 0 and the length of the string, inclusive.  HINT: Watch out for spaces!  
Input Format
There are two lines of input:      
The first line contains a string.    
The second line contains an integer.  
Output Format A single String.
1 week ago
1 week ago
Task Given a string, s, and two indices, start and end, print a substring consisting of all characters in the inclusive range from start to end - 1. You'll find the String class's substring method helpful in completing this challenge.  Input Format The first line contains a single string denoting s. The second line contains two space-separated integers denoting the respective values of start and end.
Constraints      1 <= |s| <= 100     0 <= start <= end <= n    
String s consists of letters of the Hungarian alphabet and punctuation marks  
Output Format Print the substring in the inclusive range from start to end - 1.
1 week ago
1 week ago
"A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward." (Wikipedia)  Task Given a string A, print 'Yes' if it is a palindrome, print 'No' otherwise.  Constraints      A will consist at most lower case english letters.      
Sample input  
anna  
Sample output
 Yes
1 week ago
1 week ago
Recently I solved two coding problems. The answears are right - however I would post it here to check: if there is any easier or better way of thnking which I can pick up.


Task Given two strings, a and b, create a bigger string made of the first char of b, the first char of a, the second char of b, the second char of a, and so on. Any leftover chars go to the end of the result.  HINT: Watch out for spaces!  Input Format There are two lines of input, both contain a String.  

Sample input
Hi there  
Sample output
 tHhiere


I created a the code below for this
1 week ago
Thank you Knute that you put in the work - really!
This is something what I really appreaciate and I hope that later when I am able to achieve a good command of Java coding - I give it back to the society or our community.

I solved the problem - there were an input and it was needed a Scanner. I created one inside the contstructor a (System.in) method(? - do I tell it correctly? ) and it worked.

I have a bunch of different task whic should be somehow solved - and also I need to put and store all knowledge from it. Could you help in that ?

Similiar like this - actually HackerRank challenges.
1 week ago