Skip to main content

Questions tagged [sequence]

Filter by
Sorted by
Tagged with
-1 votes
3 answers
407 views

What is the "best way" to implement something like this: I have a list of steps that will be iterated and ran for an IContext instance. But, some steps will only apply to a specific instance ...
Joery's user avatar
  • 117
0 votes
3 answers
864 views

I have 1000 lines in a text file. I want to read them into some data structure[DS]. After reading them, I will be randomly picking 50 lines from the DS (using a Random Number Generator). Next time 50 ...
user93353's user avatar
  • 429
0 votes
1 answer
421 views

within the sequence diagram it is possible to return a value, with return of a method edge, however this is usually done with a simple numeric or string value. Is it possible to return a whole object? ...
user13047397's user avatar
-1 votes
1 answer
179 views

Infinite sequences with a specific starting point are well-understood by now. For example, the Fibonacci numbers can be programmed like this: def fibonacci(): a, b = 0, 1 while True: ...
l0b0's user avatar
  • 11.6k
2 votes
3 answers
2k views

I am looking for text compression algorithms (natural language compression, rather than compression of arbitrary binary data). I have seen for example An Efficient Compression Code for Text ...
Lance Pollard's user avatar
1 vote
1 answer
995 views

Sorry if the title is confusing, but here's an example to illustrate what I'm trying to accomplish. I would like to create a 'checksum' or ID grouping of similar number sequences, so that when you ...
green sammich's user avatar
3 votes
1 answer
342 views

There some times appears a task when you have a sequence of object and you need perform some action when a particular pattern (subsequence?) occurs. As more concrete example we can imagine a log ...
scorpp's user avatar
  • 141
0 votes
1 answer
2k views

I am building an implementation of the [Merkle-Hellman Knapsack Cryptosystem] for my study.(https://en.wikipedia.org/wiki/Merkle%E2%80%93Hellman_knapsack_cryptosystem) One of the things I would like ...
Qqwy's user avatar
  • 4,947
-1 votes
1 answer
1k views

I have a string that contains numbers in sequence. There are no delimiters between numbers. I have to find missing number in that sequence. For example: 176517661768 is missing the number: 1767 ...
Neo's user avatar
  • 31
0 votes
3 answers
126 views

I will use C# here as an example, but my question is about any language. My question is from framework to compiler perspective (i.e the solution can be by implementing given idea inside compiler) ...
greenoldman's user avatar
  • 1,533
4 votes
3 answers
811 views

Since this question is not about "code not working", I'm asking my first question here instead of StackOverflow. Inform me if any required information is missing from the question. Setup: I have two ...
Abbas's user avatar
  • 543
2 votes
1 answer
278 views

I have a stream of integer data and want to perform some statistical analysis on it. I want to calculate the mean and the standard deviation of it. So far it isn't hard, but keep in mind that I am ...
WorldSEnder's user avatar
2 votes
2 answers
661 views

Let's say I have a sequence of items of unknown length, n. I want to randomize the order of this sequence without having to go through the entire sequence. Are there any algorithms that can do this? ...
myermian's user avatar
  • 191
3 votes
1 answer
627 views

From the reference of berkeley's version of sicp text, It is mentioned that: Expressing programs as sequence operations helps us design programs that are modular. That is, our designs are ...
overexchange's user avatar
  • 2,325
-1 votes
2 answers
3k views

Only two operations are allowed on tuple, as shown below. Operations like insert / delete at an index is not allowed. I learnt that tuple is an immutable data model. list allows insert and delete ...
overexchange's user avatar
  • 2,325
0 votes
1 answer
829 views

I came across this one problem, There is a particular sequence only uses the numbers 1, 2, 3, 4 and no two adjacent numbers are the same. Write a program that given n1 1s, n2 2s, n3 3s, n4 4s will ...
dharakk's user avatar
4 votes
2 answers
493 views

I am building a strategy game where multiple units(5 - 20) fighting each other. I have a game logic that calculate all the actions that been done on each turn, and send it to the game engine to ...
Ilya Gazman's user avatar
0 votes
4 answers
2k views

Given an array of positive integers in increasing order. Separate them in two series, an arithmetic sequence and geometric sequence. The given array is such that a solution do exist. The union of ...
user1814037's user avatar
3 votes
1 answer
6k views

How could I draw the database transaction commit in the sequence diagram? EDIT I want to draw in sequence diagram database transaction commit/rollback process
Roshan's user avatar
  • 133
6 votes
1 answer
30k views

I realise these two diagrams are very similar, with the obvious difference one models the sequence of a certain function, whilst the other models the state throughout a function being carried out. ...
Prisoner's user avatar
  • 343
1 vote
1 answer
2k views

Everything is in the question. I've just discovered this new feature and I don't really understand what it stands for. All I know is that it can represent loops and alternatives in sequence diagrams. ...
Dimitri's user avatar
  • 143
0 votes
2 answers
238 views

In the below Sequence diagram, when the user have entered the Username and Password, I have to do the authentication. Now you can see two details valid details and invalid detail in the diagram , ...
Ant's's user avatar
  • 732
5 votes
2 answers
307 views

I am being asked to define several of my algorithms in mathematical terms to describe my work to a customer. I am trying to determine if anybody knows whether common operators for collections like ...
sesteel's user avatar
  • 75
5 votes
4 answers
2k views

EDIT: As gavenkoa's answer points out, Oracle Database 12c (released a couple of years after this question was asked) has support for Identity Columns. As far as I know, Oracle's RDBMS is one of the ...
Sergio Acosta's user avatar