Extract values and multilpicities from list
- To: mathgroup at smc.vnet.net
- Subject: [mg64849] Extract values and multilpicities from list
- From: "Dr. Wolfgang Hintze" <weh at snafu.de>
- Date: Sun, 5 Mar 2006 03:19:20 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Given a list of integers which may repeat, e.g. lstIn = {2,3,4,4,2,1,1,5,4} provide a list of different values and their respective multiplicities, in the example, LstOut= {{1,2},{2,2},{3,1},{4,3},{5,1}} Who finds the shortest function doing this task in general? Thanks. Best regards, Wolfgang
- Follow-Ups:
- Re: Extract values and multilpicities from list
- From: "Carl K. Woll" <carlw@wolfram.com>
- Re: Extract values and multilpicities from list
- From: gardyloo <gardyloo@mail.wsu.edu>
- Re: Extract values and multilpicities from list
- From: Pratik Desai <pdesai1@umbc.edu>
- Re: Extract values and multilpicities from list