I am doing a program on palindrome using only stacks
my code works the only question I have is how can i run my program so that it ignores spaces and non letter symbols??
//importing packages...
Type: Posts; User: mgutierrez19
I am doing a program on palindrome using only stacks
my code works the only question I have is how can i run my program so that it ignores spaces and non letter symbols??
//importing packages...
Its part of my assignment to use vectors so I have to use vectors or else I would use an arraylist
Can anyone at least help me and show me how to create a vector and add elements into it from an input file?
I have to create a program which reads and processes an input file with account transactions ordered by transaction date
and generates a report every time the date of the current transaction being...
correction my output when i run the program is (0,0,1,2,3,4,5,6) so it leaves out that last two integers of my array
I am trying to implement recursive mergesort algorithm and it is almost done the only thing is that if i want to mergesort ( 7, 1 ,2, 3, 5, 6, 8, 4) when i run the program my output is (0, 0, 1, 2,...
Can anyone help me on this??
Write the pseudocode of the algorithm that does the following:
* it takes a 9x9 matrix filled with numbers from 0 to 9: 0s stand for a missing sudoku number (a number...
I started that and thats all I have i dont know what to put in for the code.
this is the class world
import java.io.*;
public class World
{
private int size;
private Individual[][]...
Just need help getting this class started if anyone can help me out please
• Object NaiveWorld that inherits from World:
o Attributes: no more than in the parent class World
o Methods: ...
Yeah but I want it to return 1 only if the pattern is found inside my array else it should return 0, my code keeps returning 1 if the first digit in the pattern is found which I dont want it to do, I...
I added in the for where I was missing it in my loop, but the code is still not working. it only returns 1 to me once it finds the first part of the pattern it doesnt check the pattern completely.
I worked on the code and I came up with this but when I run it it does not run properly because it stops checking for the other numbers once it finds the first ones.
public static int...
I have to create a lab that will
Print out the input 2D-array as an image on the console screen.
• Replace 0 by “ ” {space}.
• Replace values between 1 and 99 by “.” {one dot}.
• Replace...
42 0 33 67 145 41 23 7 8 255
234 0 0 157 0 0 0 0 1 5
167 0 143 0 0 0 8 1 7 255
178 2 41 0 0 0 255 1 6 6
189 3 1 0 0 0 0 0 5 8
0 0 0 93 78 1 0 157 63 143 ...
- Checks if the first string is a substring of the second one.
- Returns 0 if it is not a substring / 1 if it is / -1 if it is a “circular substring” (see example).
Example:
- abcde is a...
Thank you guys very much for all you help
If you can review this code please see what you think about it
please give me some feedback?
public static boolean partialmatching(string str1, string str2, int N)
{
int count = 0;
for...
I know I was noticing that about the return statements also
what would be your suggestions to make sure that the program completely checks that str2 is a substring of str1
what do you think about this code can you look over it I think I might be done
public static boolean partialmatching(string str1, string str2, int N)
{
for (int i = 0; i < str2.length();...
yes the letters can be found anywhere but as long as their in consecutive order
okay sorry I am asking so many questions but I'm stuck on this method for the longest time i greatly appreciate the time your taking to help me
public static boolean partialmatching(string str1,...
inside the curlys where you put test wrap around bit in comments what did you mean by that?
public static int substring(String Str1, String Str2)
{
int return = 0
for(int i = 0; i < Str2.length(); i++)
{
if (Str2.charAt(i) == Str1.charAt(0))
for(int j =0; j <...
an algorithm would be nice cause i have this so far
public static boolean partialmatching(string str1, string str2, Int N)
{
int count = 0
for (int i = 0; i < Str1.length(); i++)
{
...
I need to write a User Defined Method which
Checks if the first string is a substring of the second one.
- Returns 0 if it is not a substring / 1 if it is / -1 if it is a “circular substring” ...