Bubble sorting Programming Software Development by qaz1134 … in = new BufferedReader (new InputStreamReader(System.in)); char characterArray[]; System.out.print("Enter Name:\t"); Arrays.sort…(characterArray); for (int i = 0; i < characterArray.length; i++) { System.out.print(characterArray[i]); System.out.… Re: Bubble sorting Programming Software Development by stephen84s I said [code=java] char characterArray[] = new char[charArraySize];[/code] I had said replace "charArraySize&… array size is 20 it should be:- [code=java] char characterArray[] = new char[20];[/code] And no BufferedReader can also read… Re: Bubble sorting Programming Software Development by stephen84s … initialize your character array something like this:- [code=java] char characterArray[] = new char[charArraySize]; [/code] where the "charArraySize" implies… Re: Bubble sorting Programming Software Development by qaz1134 … 20 should i write it this way? [code=java] char characterArray[20] = new char[charArraySize]; [/code] :icon_question: :confused: iam kinda lost… ArrayList sorting by letter and number Programming Software Development by nixufix … = input.next(); int wordLen = word.length(); ArrayList<Character> characterArray = new ArrayList<Character>(); for (int v = 0; v…; v++) { for (int i = 0; i < wordLen; i++) { if(characterArray.contains(word.charAt(i))) { System.out.println("Object exists… struct Programming Software Development by drjay1627 … of chars. eg. (ruby code): [code] Somestruct = Struct .new(:character, :characterArray) structure = Somestruct.new(" ", []) [/code] How do I do… Re: struct Programming Software Development by woooee [QUOTE]Somestruct = Struct .new(:character, :characterArray) structure = Somestruct.new(" ", [])[/QUOTE]This is just a … Problem with writing Arrays in pseudocode Programming Computer Science by bob_8 … question on arrays. The question asks me to split the characterArray= joe,487 into two seperate variables, one is a variable… Re: strcat questions Programming Software Development by Nick Evan …. If you're serious about learning C++, then drop the characterarray as soon as possible. std::strings are the way to… Re: Bubble sorting Programming Software Development by qaz1134 really many thanks to you.. i wish i could do something for you too THAnks so much:) Re: Bubble sorting Programming Software Development by Ezzaral >really many thanks to you.. i wish i could do something for you too Well, you could mark the thread as "Solved" and leave him a favorable reputation comment on the post. Re: ArrayList sorting by letter and number Programming Software Development by JamesCherrill You only read in 1 word from the user (line 11). That needs to be in some kind of loop somewhere to read in the right number of words - either read them all into an array then process them, or read them one at a time and process each one straight away. Re: struct Programming Software Development by scru [code=python] from ctypes import * class Trie(Structure): _fields_ = [("foo", c_char, ("bar", ARRAY(c_char, 10))] [/code] Don't have a testing machine in front of me so that code might be slightly off. Re: struct Programming Software Development by drjay1627 Thanks mate cheers! I was doing some research last night and I found this: from collections import namedtuple namedtuple("MyClass", "foo bar") MyClass(foo=1, bar=2) Which is something similar to what I'm looking for. But my python version seems to be off, so I get this ImportError. Do you know how to fix import errors? … Re: struct Programming Software Development by scru For named tuple you need >= python26 (that includes python30). Note that if you intend to use it for calling into C code, namedtuple won't work. Re: struct Programming Software Development by drjay1627 This is what I did: [code] class MyClass: def __init__(self, f, r): self.first = f self.rest = r def main(argv = sys.argv): newclass = MyClass(" ", []) ... [/code] Its probably not the most efficient way of doing things but it works. Thanks for all your reply! drjay Re: struct Programming Software Development by woooee That works just fine. Being paranoid, I like to supply defaults. Using a class works fine until it becomes too cumbersome or you want a better way of looking things up, then you move up to using an SqLite DB in memory.[CODE]class MyClass: def __init__(self, f=" ", r=[]): self.first = f self.rest = r if __name__ == "… Re: struct Programming Software Development by scru I wouldn't worry too much about space usage. On a typical 32bit python installation using __slots__, your class uses 16 bytes per instance, not counting the storage for the data within the class, and you shouldn't (8 of these are mandatory for a base python object, so in reality it uses 8 bytes for your data; two 32-bit pointers, which is what the … Re: Problem with writing Arrays in pseudocode Programming Computer Science by TrustyTony I can not understand what you are after, this does not sound like problem of finding the correct algorithm for problem, it sounds more like you already have the pseudo code algorithm given to you. Re: Problem with writing Arrays in pseudocode Programming Computer Science by bob_8 All that is give to me is the array joe,487 in blocks and i have to write a solution algorithm that splits the joe away from 487. And then i have to print the idArray and nameArray . Re: Problem with writing Arrays in pseudocode Programming Computer Science by TrustyTony So you must write algorithm to separate the letters 'joe,' from letters '487'? It does look awfully implementation oriented to really be pseudocode. Re: Problem with writing Arrays in pseudocode Programming Computer Science by Nigam_1 suppose you wanted to find ',' in the array "hello,all" so the pseudocode would be :- foreach char c in array if c = "," print "found you" you can use this template to solve your question Re: Problem with writing Arrays in pseudocode Programming Computer Science by abdiqani I,can not understand you but you need to jeo,487' block and logrithem folow I give you wen example how to use arry // to accept a list of numbers int a 1-d array, find their sum and average and display them. #include <iostream.h> int main() { int a[10], i, n, sum; float avg; cout<<"Enter no of … Re: Problem with writing Arrays in pseudocode Programming Computer Science by nouth `a` is declared to be an array of `int` type and of size `10`. A maximum of `10` numbers can be written into the array. The variables `n`, `i` and `sum` are declared to be variables of `int` type where `n` is to collect the number of values to be read into the array `a`, which lies within `1` and `10`, `i` is to traverse all of the values in `a`, …